最新消息:VPS服务器又从fzhost.net换回Linode了,主题仍用朋友推荐的大前端D8

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

LNMP crifan 147浏览 0评论

折腾:

【记录】尝试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-fpm  done

再试一次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-fpm  done

转载请注明:在路上 » 【已解决】lnmp中修改了mysql的配置文件/etc/my.cnf后重启失败:ERROR The server quit without updating PID file

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
18 queries in 0.198 seconds, using 10.03MB memory