日期:2014-05-16  浏览次数:20988 次

Mysql服务启动错误之(MySQL manager or server PID file could not be found)

对于类似的错误,网上很多,但是多归多,找到解决思路的方法才是最为重要的!现在我们来看,当我执行

[root@cacti init.d]# service mysqld start
Starting MySQL...................................          [FAILED]

无法启动,/etc/init.d/mysqld  start仍然无法启动,对于无法启动,或者其他异常的信息出现时,我们首先应该找到错误,通过什么,日志,是一个有力的反馈给我的信息捷径。。

于是,到/usr/local/mysql/var/查看日志文件*.err的文件,我们vim编辑看下里面的内容

120919 17:19:31  mysqld started
120919 17:19:31  InnoDB: Started; log sequence number 0 43655
120919 17:19:31 [Note] /usr/local/mysql/libexec/mysqld: ready for connections.
Version: '5.0.22-log'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
120919 17:41:09 [Note] /usr/local/mysql/libexec/mysqld: Normal shutdown


120919 17:41:09  InnoDB: Starting shutdown...
120919 17:41:11  InnoDB: Shutdown completed; log sequence number 0 43655
120919 17:41:11 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete


120919 17:41:11  mysqld ended


120919 17:41:12  mysqld started
^G/usr/local/mysql/libexec/mysqld: File './mysql-bin.index' not found (Errcode: 13)
120919 17:41:12 [ERROR] Aborting


120919 17:41:12 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete


120919 17:41:12  mysqld ended


120919 17:42:07  mysqld started
^G/usr/local/mysql/libexec/mysqld: File './mysql-bin.index' not found (Errcode: 13)
120919 17:42:07 [ERROR] Aborting


^G/usr/local/mysql/libexec/mysqld: File './mysql-bin.index' not found (Errcode: 13)
120919 17:41:12 [ERROR] Aborting


120919 17:41:12 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete


120919 17:41:12  mysqld ended


120919 17:42:07  mysqld started
^G/usr/local/mysql/libexec/mysqld: File './mysql-bin.index' not found (Errcode: 13)
120919 17:42:07 [ERROR] Aborting


120919 17:42:07 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete


120919 17:42:07  mysqld ended


120919 17:42:54  mysqld started
^G/usr/local/mysql/libexec/mysqld: File './mysql-bin.index' not found (Errcode: 13)
120919 17:42:54 [ERROR] Aborting


120919 17:42:54 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete


120919 17:42:54  mysqld ended


120919 17:43:57  mysqld started
^G/usr/local/mysql/libexec/mysqld: File './mysql-bin.index' not found (Errcode: 13)
120919 17:43:57 [ERROR] Aborting


120919 17:43:57 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete


120919 17:43:57  mysqld ended


120919 17:51:30  mysqld started
^G/usr/local/mysql/libexec/mysqld: File './mysql-bin.index' not found (Errcode: 13)
120919 17:51:30 [ERROR] Aborting

看到红色错误了吗?是找不到mysql-bin.index文件,当我退出编辑状态,回到/usr/local/mysql/var目录下可以明细看到又该文件!以下为信息

[root@cacti var]# ll
total 21880
drwx------ 2 root  mysql    12288 Sep 19 16:42 cactidb
-rw-rw---- 1 mysql mysql     6433 Sep 20 13:05 cacti.err
-rw-rw---- 1 root  mysql 10485760 Sep 19 17:41 ibdata1
-rw-rw---- 1 root  mysql  5242880 Sep 19 17:41 ib_logfile0
-rw-rw---- 1 root  mysql  5242880 Sep 19 13:13 ib_logfile1
drwx------ 2 root  mysql     4096 Sep 19 13:12 mysql
-rw-rw---- 1 root  mysql    15117 Sep 19 13:12 mysql-bin.000001
-rw-rw---- 1 root  mysql   484379 Sep 19 13:12 mysql-bin.000002
-rw-rw---- 1 root  mysql   281933 Sep 19 16:52 mysql-bin.000003
-rw-rw---- 1 root  mysql      117 Sep 19 16:52 mysql-bin.000004
-rw-rw---- 1 root