我是靠谱客的博主 坚强发卡,最近开发中收集的这篇文章主要介绍mysql启动失败--Job for mysqld.service failed because the control process exited,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

1.centos7启动报错

Starting mysqld (via systemctl):  Job for mysqld.service failed because the control process exited with error code. 

See "systemctl status mysqld.service" and "journalctl -xe" for details.

2. more /var/log/mysqld.log 查看日志

2018-09-13T02:45:55.234888Z 0 [ERROR] /usr/local/mysql/bin/mysqld: Can't create/write to file 

'/var/run/mysqld/mysqld.pid' (Errcode: 2 - No such file
 or directory)
2018-09-13T02:45:55.234901Z 0 [ERROR] Can't start server: can't create PID file: No such file or directory
[root@izwz9i6slp0lyfpq28b2xoz local]# more /var/log/mysqld.log 

缺少目录文件

# mkdir -p  /var/run/mysqld  ,该文件会创建一个mysqld.pid

3.启动依然报错,权限问题

2018-09-13T02:51:20.206992Z 0 [ERROR] /usr/local/mysql/bin/mysqld: Can't create/write to file '/var/run/mysqld/mysqld.pid' (Errcode: 13 - Permission 
denied)
2018-09-13T02:51:20.207004Z 0 [ERROR] Can't start server: can't create PID file: Permission denied

4. chown mysql.mysql /var/run/mysqld/

最后

以上就是坚强发卡为你收集整理的mysql启动失败--Job for mysqld.service failed because the control process exited的全部内容,希望文章能够帮你解决mysql启动失败--Job for mysqld.service failed because the control process exited所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(48)

评论列表共有 0 条评论

立即
投稿
返回
顶部