Starting MySQL...Manager of pid-file quit without updating failed
今天发现装一台机器上mysql登录异常了,仔细检查发现是mysqld服务没了,手动启动,报下面的错误,
Starting MySQL…Manager of pid-file quit without updating
到/data/mysql/下看了一下错误日志文件:localhost.localdomain.err, 有下面一段
100408 0:45:32 [Note] Event Scheduler: Purging the queue. 0 events
100408 0:45:32 InnoDB: Starting shutdown…
100408 0:45:32 InnoDB: Shutdown completed; log sequence number 0 383861955
100408 0:45:32 [Warning] Forcing shutdown of 1 plugins
100408 0:45:32 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete
100408 00:45:32 mysqld_safe mysqld from pid file /data/mysql/localhost.localdomain.pid ended
100408 00:45:33 mysqld_safe Starting mysqld daemon with databases from /data/mysql
100408 0:45:33 [Note] Plugin ‘FEDERATED’ is disabled.
100408 0:45:33 InnoDB: Started; log sequence number 0 383861955
/usr/local/mysql/bin/mysqld: File ‘./mysql-bin.000056′ not found (Errcode: 13)
100408 0:45:33 [ERROR] Failed to open log (file ‘./mysql-bin.000056′, errno 13)
100408 0:45:33 [ERROR] Could not open log file
100408 0:45:33 [ERROR] Can’t init tc log
100408 0:45:33 [ERROR] Aborting
网上搜了一下,有人说将/etc/my.cnf里面的 skip federated注释掉即可,但我的my.cnf里压根就没有这一项,还有人说/etc/my.cnf中没有设置datadir=/data/mysql,但我看了这一项已经有了。
最后发现一篇文章说data/mysql-bin.index没有删除,data/mysql-bin.index是存放日志文件索引的文件,只删除了日志文件而没有对日志的索引文件做处理显然是不行的。
删除/data/mysql_db/mysql-bin.index文件,再/etc/init.d/mysqld start就可以了