MySQL启动错误ERROR! MySQL server PID file could not be found的解决办法

/etc/init.d/mysql start无法启动mysql错误信息如下:

ERROR! MySQL server PID file could not be found!

Starting MySQL.. ERROR! The server quit without updating PID file (/usr/local/mysql/var/AYXXXXXXXXXXX.pid). 


完整日志信息如下:


140902 18:11:33 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
140902 18:11:33 InnoDB: The InnoDB memory heap is disabled
140902 18:11:33 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140902 18:11:33 InnoDB: Compressed tables use zlib 1.2.3
140902 18:11:33 InnoDB: Initializing buffer pool, size = 16.0M
140902 18:11:33 InnoDB: Completed initialization of buffer pool
140902 18:11:33 InnoDB: highest supported file format is Barracuda.
140902 18:11:33  InnoDB: Waiting for the background threads to start
140902 18:11:34 InnoDB: 5.5.37 started; log sequence number 18321078305
/usr/local/mysql/bin/mysqld: File './mysql-bin.000035' not found (Errcode: 2)
140902 18:11:34 [ERROR] Failed to open log (file './mysql-bin.000035', errno 2)
140902 18:11:34 [ERROR] Could not open log file
140902 18:11:34 [ERROR] Can't init tc log
140902 18:11:34 [ERROR] Aborting

140902 18:11:34  InnoDB: Starting shutdown...
140902 18:11:35  InnoDB: Shutdown completed; log sequence number 18321078305
140902 18:11:35 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

140902 18:11:35 mysqld_safe mysqld from pid file /usr/local/mysql/var/AY140429171715Z.pid ended
140902 18:12:55 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
140902 18:12:56 InnoDB: The InnoDB memory heap is disabled
140902 18:12:56 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140902 18:12:56 InnoDB: Compressed tables use zlib 1.2.3
140902 18:12:56 InnoDB: Initializing buffer pool, size = 16.0M
140902 18:12:56 InnoDB: Completed initialization of buffer pool
140902 18:12:56 InnoDB: highest supported file format is Barracuda.
140902 18:12:57  InnoDB: Waiting for the background threads to start
140902 18:12:58 InnoDB: 5.5.37 started; log sequence number 18321078305
/usr/local/mysql/bin/mysqld: File './mysql-bin.000035' not found (Errcode: 2)
140902 18:12:58 [ERROR] Failed to open log (file './mysql-bin.000035', errno 2)
140902 18:12:58 [ERROR] Could not open log file
140902 18:12:58 [ERROR] Can't init tc log
140902 18:12:58 [ERROR] Aborting

140902 18:12:58  InnoDB: Starting shutdown...
140902 18:12:58  InnoDB: Shutdown completed; log sequence number 18321078305
140902 18:12:58 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

140902 18:12:58 mysqld_safe mysqld from pid file /usr/local/mysql/var/AY140429171715Z.pid ended
140902 18:30:59 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
140902 18:30:59 InnoDB: The InnoDB memory heap is disabled
140902 18:30:59 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140902 18:30:59 InnoDB: Compressed tables use zlib 1.2.3
140902 18:30:59 InnoDB: Initializing buffer pool, size = 16.0M
140902 18:30:59 InnoDB: Completed initialization of buffer pool
140902 18:30:59 InnoDB: highest supported file format is Barracuda.
140902 18:31:00  InnoDB: Waiting for the background threads to start
140902 18:31:01 InnoDB: 5.5.37 started; log sequence number 18321078305
/usr/local/mysql/bin/mysqld: File './mysql-bin.000035' not found (Errcode: 2)
140902 18:31:01 [ERROR] Failed to open log (file './mysql-bin.000035', errno 2)
140902 18:31:01 [ERROR] Could not open log file
140902 18:31:01 [ERROR] Can't init tc log
140902 18:31:01 [ERROR] Aborting

140902 18:31:01  InnoDB: Starting shutdown...
140902 18:31:01  InnoDB: Shutdown completed; log sequence number 18321078305
140902 18:31:01 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

140902 18:31:01 mysqld_safe mysqld from pid file /usr/local/mysql/var/AY140429171715Z.pid ended
140902 18:32:10 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
140902 18:32:10 InnoDB: The InnoDB memory heap is disabled
140902 18:32:10 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140902 18:32:10 InnoDB: Compressed tables use zlib 1.2.3
140902 18:32:10 InnoDB: Initializing buffer pool, size = 16.0M
140902 18:32:10 InnoDB: Completed initialization of buffer pool
140902 18:32:10 InnoDB: highest supported file format is Barracuda.
140902 18:32:10  InnoDB: Waiting for the background threads to start
140902 18:32:11 InnoDB: 5.5.37 started; log sequence number 18321078305
/usr/local/mysql/bin/mysqld: File './mysql-bin.000035' not found (Errcode: 2)
140902 18:32:11 [ERROR] Failed to open log (file './mysql-bin.000035', errno 2)
140902 18:32:11 [ERROR] Could not open log file
140902 18:32:11 [ERROR] Can't init tc log
140902 18:32:11 [ERROR] Aborting

140902 18:32:11  InnoDB: Starting shutdown...
140902 18:32:11  InnoDB: Shutdown completed; log sequence number 18321078305
140902 18:32:11 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

140902 18:32:11 mysqld_safe mysqld from pid file /usr/local/mysql/var/AY140429171715Z.pid ended
140902 18:32:14 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
140902 18:32:14 InnoDB: The InnoDB memory heap is disabled
140902 18:32:14 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140902 18:32:14 InnoDB: Compressed tables use zlib 1.2.3
140902 18:32:14 InnoDB: Initializing buffer pool, size = 16.0M
140902 18:32:14 InnoDB: Completed initialization of buffer pool
140902 18:32:14 InnoDB: highest supported file format is Barracuda.
140902 18:32:14  InnoDB: Waiting for the background threads to start
140902 18:32:15 InnoDB: 5.5.37 started; log sequence number 18321078305
/usr/local/mysql/bin/mysqld: File './mysql-bin.000035' not found (Errcode: 2)
140902 18:32:15 [ERROR] Failed to open log (file './mysql-bin.000035', errno 2)
140902 18:32:15 [ERROR] Could not open log file
140902 18:32:15 [ERROR] Can't init tc log
140902 18:32:15 [ERROR] Aborting

140902 18:32:15  InnoDB: Starting shutdown...
140902 18:32:15  InnoDB: Shutdown completed; log sequence number 18321078305
140902 18:32:15 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

140902 18:32:15 mysqld_safe mysqld from pid file /usr/local/mysql/var/AY140429171715Z.pid ended
140902 18:33:15 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
140902 18:33:15 InnoDB: The InnoDB memory heap is disabled
140902 18:33:15 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140902 18:33:15 InnoDB: Compressed tables use zlib 1.2.3
140902 18:33:15 InnoDB: Initializing buffer pool, size = 16.0M
140902 18:33:15 InnoDB: Completed initialization of buffer pool
140902 18:33:15 InnoDB: highest supported file format is Barracuda.
140902 18:33:15  InnoDB: Waiting for the background threads to start
140902 18:33:16 InnoDB: 5.5.37 started; log sequence number 18321078305
/usr/local/mysql/bin/mysqld: File './mysql-bin.000035' not found (Errcode: 2)
140902 18:33:16 [ERROR] Failed to open log (file './mysql-bin.000035', errno 2)
140902 18:33:16 [ERROR] Could not open log file
140902 18:33:16 [ERROR] Can't init tc log
140902 18:33:16 [ERROR] Aborting

140902 18:33:16  InnoDB: Starting shutdown...
140902 18:33:17  InnoDB: Shutdown completed; log sequence number 18321078305
140902 18:33:17 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

140902 18:33:17 mysqld_safe mysqld from pid file /usr/local/mysql/var/AY140429171715Z.pid ended
140902 18:34:05 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
140902 18:34:05 [Warning] You need to use --log-bin to make --binlog-format work.
140902 18:34:05 InnoDB: The InnoDB memory heap is disabled
140902 18:34:05 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140902 18:34:05 InnoDB: Compressed tables use zlib 1.2.3
140902 18:34:05 InnoDB: Initializing buffer pool, size = 16.0M
140902 18:34:05 InnoDB: Completed initialization of buffer pool
140902 18:34:05 InnoDB: highest supported file format is Barracuda.
140902 18:34:05  InnoDB: Waiting for the background threads to start
140902 18:34:06 InnoDB: 5.5.37 started; log sequence number 18321078305
140902 18:34:06 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
140902 18:34:06 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
140902 18:34:06 [Note] Server socket created on IP: '0.0.0.0'.
140902 18:34:07 [Note] Event Scheduler: Loaded 0 events
140902 18:34:07 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.5.37'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
140902 18:34:30 [Note] /usr/local/mysql/bin/mysqld: Normal shutdown

140902 18:34:30 [Note] Event Scheduler: Purging the queue. 0 events
140902 18:34:30  InnoDB: Starting shutdown...
140902 18:34:30  InnoDB: Shutdown completed; log sequence number 18321078305
140902 18:34:30 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

140902 18:34:30 mysqld_safe mysqld from pid file /usr/local/mysql/var/AY140429171715Z.pid ended
140902 18:34:31 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
140902 18:34:31 [Warning] You need to use --log-bin to make --binlog-format work.
140902 18:34:31 InnoDB: The InnoDB memory heap is disabled
140902 18:34:31 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140902 18:34:31 InnoDB: Compressed tables use zlib 1.2.3
140902 18:34:31 InnoDB: Initializing buffer pool, size = 16.0M
140902 18:34:31 InnoDB: Completed initialization of buffer pool
140902 18:34:31 InnoDB: highest supported file format is Barracuda.
140902 18:34:31  InnoDB: Waiting for the background threads to start
140902 18:34:32 InnoDB: 5.5.37 started; log sequence number 18321078305
140902 18:34:32 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
140902 18:34:32 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
140902 18:34:32 [Note] Server socket created on IP: '0.0.0.0'.
140902 18:34:32 [Note] Event Scheduler: Loaded 0 events
140902 18:34:32 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.5.37'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution


启动会报错Starting MySQL.. ERROR! The server quit without updating PID file (/var/local/mysql/var/AYxxxxxxx.pid)原因是因为 mysql-bin.0000*的文件占满系统盘,磁盘空间不足导致无法写入。


解决方法:

1:删除所有mysql-bin.0000*日志文件全部rm掉

2:修改在my.cnf 文件,找到 log-bin=mysql-bin 将其启注释掉,以后就不会产生2进制的mysql-bin.0000*的日志文件

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。