20151216154538

Starting MySQL. ERROR! Manager of pid-file quit without updating file.

Lnmp mysql启动错误解决办法:

提示错误
ERROR! MySQL manager or server PID file could not be found!

Starting MySQL. ERROR! Manager of pid-file quit without updating file.

网上非常多说法,大家也可以去搜索,也可以参考一下我的,不管是什么错误,大家一定要查看日志才能快速找到办法去修复
一般情况下,lnmp默认的错误日志是在/usr/local/mysql/var下面,yourhost.err (yourhost即你vps的服务器名称)
大家先看看日志more yourhost.err看看是因为什么原因报错的

151216 07:20:16 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
151216 7:20:16 [ERROR] You need to use –log-bin to make –binlog-format work.
151216 7:20:16 [ERROR] Aborting

151216 7:20:16 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete

151216 07:20:16 mysqld_safe mysqld from pid file /usr/local/mysql/var/yourhost.pid ended

从日志可以看出[ERROR] You need to use –log-bin to make –binlog-format work.

然后查看了一下/etc/my.cnf 发现关闭mysql的日志,而binlog_format=mixed没有注释的缘故

#log-bin=mysql-bin

binlog_format=mixed

那么把binlog_format=mixed修改为#binlog_format=mixed,然后重启mysql, /etc/init.d/mysql start

发表评论

电子邮件地址不会被公开。 必填项已用*标注