• ADADADADAD

    Mysql:The server quit without updating PID file (/eipdb1/mysql/data/EIPDB1.pid).[ mysql数据库 ]

    mysql数据库 时间:2024-12-24 19:10:23

    作者:文/会员上传

    简介:

    环境:mysql主从,一台主机,一台备机。都是虚拟机。备机仅仅用来备份,不用于业务。关闭主机mysql服务,关闭主机系统,加内存。、备机不变。

    开启主机。内存加好。EIPDB1:~ # free -m

    以下为本文的正文内容,内容仅供参考!本站为公益性网站,复制本文以及下载DOC文档全部免费。

    环境:mysql主从,一台主机,一台备机。都是虚拟机。备机仅仅用来备份,不用于业务。关闭主机mysql服务,关闭主机系统,加内存。、备机不变。

    开启主机。内存加好。EIPDB1:~ # free -mtotal used free sharedbuffers cachedMem: 48274 2509457640 19378-/+ buffers/cache: 211146162Swap:10236010236开启mysql服务报错。EIPDB1:~ # mysqld service status171016 23:57:43 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
    171016 23:57:43 [ERROR] Aborting
    171016 23:57:43 [Note] mysqld: Shutdown complete
    EIPDB1:~ # service mysqld statusMySQL is running but PID file could not be found failedEIPDB1:~ # service mysqld startStarting MySQL.....................................................................................................The server quit without updating PID file (/eipdb1/mysql/data/EIPDB1.pid).
    解决:先查看了下,空间充足,没问题。EIPDB1:/usr/local # df -hFilesystemSizeUsed Avail Use% Mounted on/dev/sda340G9.1G 29G25% /devtmpfs 24G356K 24G 1% /devtmpfs24G100K 24G 1% /dev/shm/dev/sda198M 75M 19M80% /boot/dev/sdb1 490G 26G465G 6% /eipdb1
    可能是mysqld进程卡死,杀掉进程。EIPDB1:~ # ps aux | grep mysqlroot34420.00.0112921576 ?SOct16 0:00 /bin/sh /eipdb1/mysql/bin/mysqld_safe --datadir=/eipdb1/mysql/data --pid-file=/eipdb1/mysql/data/EIPDB1.pidmysql 40344.23.1 5907700 1538808 ? Sl Oct16 1:12 /eipdb1/mysql/bin/mysqld --basedir=/eipdb1/mysql --datadir=/eipdb1/mysql/data --plugin-dir=/eipdb1/mysql/lib/plugin --user=mysql --log-error=/eipdb1/mysql/data/EIPDB1.err --pid-file=/eipdb1/mysql/data/EIPDB1.pid --socket=/tmp/mysql.sock --port=3306root55880.00.0 5704 800 pts/0S+ 00:22 0:00 grep mysql
    EIPDB1:~ # kill -9 3442EIPDB1:/usr/local # kill -9 4034
    重新启动mysql服务:EIPDB1:/usr/local # service mysqld startStarting MySQL...doneEIPDB1:/usr/local # service mysqld statusMySQL running (6322) doneEIPDB1:/usr/local # ps aux | grep mysqlroot57330.00.0115041596 pts/0S00:30 0:00 /bin/sh /eipdb1/mysql/bin/mysqld_safe --datadir=/eipdb1/mysql/data --pid-file=/eipdb1/mysql/data/EIPDB1.pidmysql 63221.02.1 5839204 1065996 pts/0 Sl 00:30 0:01 /eipdb1/mysql/bin/mysqld --basedir=/eipdb1/mysql --datadir=/eipdb1/mysql/data --plugin-dir=/eipdb1/mysql/lib/plugin --user=mysql --log-error=/eipdb1/mysql/data/EIPDB1.err --pid-file=/eipdb1/mysql/data/EIPDB1.pid --socket=/tmp/mysql.sock --port=3306root63980.00.0 5700 800 pts/0S+ 00:32 0:00 grep mysql
    备库同步正常:mysql> show slave status \G;*************************** 1. row ***************************Slave_IO_State: Waiting for master to send eventMaster_Host: 10.0.2.206Master_User: slave_userMaster_Port: 3306Connect_Retry: 60Master_Log_File: master-binlog.000062Read_Master_Log_Pos: 44601Relay_Log_File: eipdb2-relay-bin.000166Relay_Log_Pos: 44751Relay_Master_Log_File: master-binlog.000062Slave_IO_Running: YesSlave_SQL_Running: Yes
    完成。
    热门标签: eipdb1.pidpidthe