报错内容如下:
Mar 05 18:40:49 VM-0-12-centos systemd[1]: Failed to start MySQL Server.
Mar 05 18:40:49 VM-0-12-centos systemd[1]: Unit mysqld.service entered failed state.
Mar 05 18:40:49 VM-0-12-centos systemd[1]: mysqld.service failed.
Mar 05 18:40:49 VM-0-12-centos systemd[1]: mysqld.service holdoff time over, scheduling restart.
Mar 05 18:40:49 VM-0-12-centos systemd[1]: start request repeated too quickly for mysqld.service
Mar 05 18:40:49 VM-0-12-centos systemd[1]: Failed to start MySQL Server.
Mar 05 18:40:49 VM-0-12-centos systemd[1]: Unit mysqld.service entered failed state.
Mar 05 18:40:49 VM-0-12-centos systemd[1]: mysqld.service failed.
解决方案:
1.查看/etc/my.cnf中日志记录,查看错误
2.如果日志为空,使用journalctl -xe查看系统日志,要一直往上翻,找报error的地方,然后再次百度修改错误。这个很重要很重要。
修改错误后,将日志文件,数据文件都清空。
再重新启动。