我已经在我的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 status 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.
journalctl -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.
systemctl status mysql.service
显示了 MySQL 服务的状态,而journalctl -xeu mysql.service
则显示了 MySQL 服务的日志。你是通过service mysqld start
还是service mysql start
来启动 MySQL 的? - Ergest Basha