配置优化后,启动mysqld服务时报错如下:
Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.
但是用提示的两条命令检查不出什么原因,所以还是要看mysql的错误日志,可以在配置文件my.cnf里面查看log_error日志位置,yum安装的mysql一般都在/var/log/mysqld.log里面查看日志。想要查看错误日志的话,用下面这条命令即可:
tail -500 /var/log/mysqld.log|grep -E 'ERROR'
一般来讲,只需要查看error日志就可以找到启动失败的原因了。
mysql启动失败原因排查
最新推荐文章于 2024-03-22 02:10:35 发布