折腾:
期间,修改了/etc/my.cnf文件,然后重启lnmp(中的mysql)结果失败:
[root@crifan ~]# lnmp restart
+——————————————-+
| Manager for LNMP, Written by Licess |
+——————————————-+
+——————————————-+
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-fpm done
再试一次lnmp restart,错误依旧。
去先杀掉mysql进程再试试
[root@crifan ~]# lnmp mysql stop
+——————————————-+
| Manager for LNMP, Written by Licess |
+——————————————-+
+——————————————-+
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
MySQL 目录 : /usr/local/mysql/
MySQL数据库所在目录:/usr/local/mysql/var/
去找了err日志,结果:
【总结】
去掉:
(Mysql中5.5.6中引入,又在5.5.6中废弃了的)
explicit_defaults_for_timestamp = true
即可正常重启:
[root@crifan ~]# lnmp restart
+——————————————-+
| Manager for LNMP, Written by Licess |
+——————————————-+
+——————————————-+
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-fpm done
注意:本文来自在路上。本站无法对本文内容的真实性、完整性、及时性、原创性提供任何保证,请您自行验证核实并承担相关的风险与后果!
CoLaBug.com遵循[CC BY-SA 4.0]分享并保持客观立场,本站不承担此类作品侵权行为的直接责任及连带责任。您有版权、意见、投诉等问题,请通过[eMail]联系我们处理,如需商业授权请联系原作者/原网站。