【已解决】lnmp中修改了mysql的配置文件/etc/my.cnf后重启失败:ERROR The server quit without upd...

2017-09-13 10:29:14来源:https://www.crifan.com/lnmp_changed_mysql_conf_restart_fail_作者:在路上人点击

分享

折腾:


【记录】尝试Linode中的crifan.com的LNMP中去优化MySQL去优化内存占用


期间,修改了/etc/my.cnf文件,然后重启lnmp(中的mysql)结果失败:


[root@crifan ~]# lnmp restart


+——————————————-+


|Manager for LNMP, Written by Licess|


+——————————————-+


| https://lnmp.org |


+——————————————-+


Stoping LNMP…


Stoping nginx…done


ERROR! MySQL server PID file could not be found!


Gracefully shutting down php-fpm . done


Starting LNMP…


Starting nginx…done


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


Starting php-fpmdone



再试一次lnmp restart,错误依旧。


MySql server startup error ‘The server quit without updating PID file ‘ – Stack Overflow


MySql ERROR! The server quit without updating PID file – Stack Overflow


MySQL服务器启动错误 ‘The server quit without updating PID file’ | pein0119


mysql启动报错:Starting MySQL… ERROR! The server quit without updating PID file – 见 – 51CTO技术博客


去先杀掉mysql进程再试试


[root@crifan ~]# lnmp mysql stop


+——————————————-+


|Manager for LNMP, Written by Licess|


+——————————————-+


| https://lnmp.org |


+——————————————-+


ERROR! MySQL server PID file could not be found!


估计是:


在修改mysql的conf后,文件权限变了?


[root@crifan ~]# ls /usr/local/var/mysql/


ls: cannot access /usr/local/var/mysql/: No such file or directory


lnmp ERROR! The server quit without updating PID file


LNMP安装了哪些软件?安装目录在哪? – LNMP一键安装包


MySQL 目录 : /usr/local/mysql/


MySQL数据库所在目录:/usr/local/mysql/var/


去找了err日志,结果:


【已解决】mysql重启出错:mysqld unknown variable explicit_defaults_for_timestamp=true


【总结】


去掉:


(Mysql中5.5.6中引入,又在5.5.6中废弃了的)


explicit_defaults_for_timestamp = true


即可正常重启:


[root@crifan ~]# lnmp restart


+——————————————-+


|Manager for LNMP, Written by Licess|


+——————————————-+


| https://lnmp.org |


+——————————————-+


Stoping LNMP…


Stoping nginx…done


ERROR! MySQL server PID file could not be found!


Gracefully shutting down php-fpm . done


Starting LNMP…


Starting nginx…done


Starting MySQL.. SUCCESS!


Starting php-fpmdone



最新文章

123

最新摄影

微信扫一扫

第七城市微信公众平台