MySQL学习6_ERROR! MySQL server PID file could not be found!解决方法
2015-09-19 11:31
881 查看
第一种:
可能是硬盘满了,清理下垃圾文件。/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*的日志文件
原文来自:
http://www.linuxidc.com/Linux/2014-09/106094.htm
第二种:
进程卡死[root@centos var]# service mysqld stop
MySQL manager or server PID file could not be found! [FAILED]
解决办法:
首先查看一下进程
[root@irxpert-test /]# ps aux |grep mysq*
root 10274 0.0 0.0 68160 1336
? S 13:43 0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/irxpert-test.pid
mysql 10353 0.0 1.0 344360 39464 ? Sl 13:43 0:00
/usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/irxpert-test.err --pid-file=/var/lib/mysql/irxpert-test.pid
root 11884 0.0 0.0 63384 760 pts/1 S+ 15:44 0:00 grep mysq*
如果看到上面的内容,那说明,Mysql的进程卡死了,这时用就要把这些卡死的进程都关闭
[root@centos mysql]# kill 10274
[root@centos mysql]# kill 10353
启动Mysql就ok了
[root@centos mysql]# service mysql start
Starting MySQL. [ OK ]
原文来自:
http://blog.sina.com.cn/s/blog_4f925fc30100rx5l.html
第三种:
是修改过my.cnf配置出错引起 执行命令:vi /etc/my.cnf 修改内容:# The MySQL server
[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
在执行第二种命令,OK
原文来自:
/article/9731880.html
相关文章推荐
- 【Little_things】jsp+MySql简单的数据录入功能
- [实战]MVC5+EF6+MySql企业网盘实战(1)
- MySQL会出现中文乱码
- MySQL 5.6 for Windows 解压缩版配置安装
- MYSQL数据库管理之权限管理
- Mysql 外网访问控制
- MySql性能调优--存储引擎介绍
- mysql数据库正确建立索引及使用
- MySQL修改root密码的方法
- 由浅入深探究mysql索引结构原理、性能分析与优化
- mysql存储引擎innodb和myisam的分析比较
- MySQL中如何查看“慢查询”,如何分析执行SQL的效率?(转载)
- mysql 常用查询
- mysql导出数据库的结构
- MySQL存储过程和函数的区别
- MySQL 设计与开发规范
- Ubuntu 安装mysql
- MYSQL基础01(新增,修改,删除)
- FreeRadius 根据mysql 下发指定地址池的地址...
- mysql用户权限极其一些基本操作,一些日期函数