mysql入坑之路(5)Failed to start SYSV: MySQL database server..的解决方法

Failed to start SYSV: MySQL database server…的解决方法
问题:
在虚拟机中安装MYSQL,重启虚拟机后MYSQL启动报错

[root@server1 ~]# systemctl start mysqld
Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.


查看日志:

journalctl -xe
cat /var/log/mysqld


解决:
建立缺少的目录

mkdir -p /var/run/mysqld
systemctl start mysqld

此是还是无法启动,修改目录权限

chown mysql.mysql /var/run/mysqld/
systemctl start mysqld

启动成功

posted @ 2022-08-05 19:09  muzlei  阅读(442)  评论(0编辑  收藏  举报