无法在 ubuntu 18.04.02 中启动 mysql

无法在 ubuntu 18.04.02 中启动 mysql
pc-050@pc050:~$ service mysql start
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.
pc-050@pc050:~$ systemctl status mysql.service
● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; disabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2019-02-28 16:36:10 IST; 3s ago
   Process: 3826 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=1/FAILURE)

Feb 28 16:36:10 pc050 systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
Feb 28 16:36:10 pc050 systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
Feb 28 16:36:10 pc050 systemd[1]: Stopped MySQL Community Server.
Feb 28 16:36:10 pc050 systemd[1]: mysql.service: Start request repeated too quickly.
Feb 28 16:36:10 pc050 systemd[1]: mysql.service: Failed with result 'exit-code'.
Feb 28 16:36:10 pc050 systemd[1]: Failed to start MySQL Community Server.
pc-050@pc050:~$ 

答案1

这是 systemctl 的一个“功能”。文件中有一个参数限制重启频率(以秒为单位)。测试时请降低该值。

尝试等待(而不是编辑实际的服务文件)看看一段时间后问题是否自行解决。

如果这不起作用,重启应该可以解决问题systemctl reboot

相关内容