我已经在我的ubuntu 21系统上安装了MySQL服务器,当我尝试启动MySQL服务器时,我得到了Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xeu mysql.service" for details.
,在我安装docker并在其上运行MySQL之前,它运行良好
systemctl状态mysql.service
mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset:>
Active: failed (Result: exit-code) since Sat 2022-01-22 18:32:17 IST; 7min>
Process: 19128 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=>
Process: 19136 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
Main PID: 19136 (code=exited, status=1/FAILURE)
Status: "Server startup in progress"
Error: 13 (Permission denied)
CPU: 313ms
Jan 22 18:32:17 Lenovo systemd[1]: mysql.service: Scheduled restart job, restar>
Jan 22 18:32:17 Lenovo systemd[1]: Stopped MySQL Community Server.
Jan 22 18:32:17 Lenovo systemd[1]: mysql.service: Start request repeated too qu>
Jan 22 18:32:17 Lenovo systemd[1]: mysql.service: Failed with result 'exit-code>
Jan 22 18:32:17 Lenovo systemd[1]: Failed to start MySQL Community Server.
日志tl-xeu mysql.service
░░ Subject: A stop job for unit mysql.service has finished
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A stop job for unit mysql.service has finished.
░░
░░ The job identifier is 6908 and the job result is done.
Jan 22 18:32:17 Lenovo systemd[1]: mysql.service: Start request repeated too qu>
Jan 22 18:32:17 Lenovo systemd[1]: mysql.service: Failed with result 'exit-code>
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ The unit mysql.service has entered the 'failed' state with result 'exit-code>
Jan 22 18:32:17 Lenovo systemd[1]: Failed to start MySQL Community Server.
░░ Subject: A start job for unit mysql.service has failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit mysql.service has finished with a failure.
░░
░░ The job identifier is 6908 and the job result is failed.
2条答案
按热度按时间czfnxgou1#
尝试以下命令
有时对于某些系统,当你给出下面两个命令时,它会显示不是一个目录,如果它显示的话,就把下面的两个命令切掉,然后执行下一个命令。
最后,尝试以下命令
在systemctl重新启动后,系统有时会挂起并注销。如果已注销,请再次登录并
运行
sudo systemctl start mysql.service
,它将正常工作。有关更多命令,请检查链接here,如果上面的命令不适用,请检查该网站上的以下命令
ryevplcw2#
我也试了一下,得到了这个:
我已经重新安装了,但没有帮助。