我在ubuntu中遇到mysql问题
我运行这段代码时
sudo service mysql start
结果
mysql.service的作业失败,因为控制进程退出并显示错误代码。 有关详细信息,请参见“ systemctl状态mysql.service”和“ journalctl -xe”。
此代码的结果
journalctl -xe
Feb 27 13:07:36 epicRR systemd[1]: Failed to start MySQL Community Server.
-- Subject: Unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit mysql.service has failed.
--
-- The result is RESULT.
Feb 27 13:07:36 epicRR systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
Feb 27 13:07:36 epicRR systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Automatic restarting of the unit mysql.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
Feb 27 13:07:36 epicRR systemd[1]: Stopped MySQL Community Server.
-- Subject: Unit mysql.service has finished shutting down
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit mysql.service has finished shutting down.
Feb 27 13:07:36 epicRR systemd[1]: mysql.service: Start request repeated too quickly.
Feb 27 13:07:36 epicRR systemd[1]: mysql.service: Failed with result 'exit-code'.
Feb 27 13:07:36 epicRR systemd[1]: Failed to start MySQL Community Server.
-- Subject: Unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit mysql.service has failed.
--
-- The result is RESULT.
Feb 27 13:07:44 epicRR sudo[5528]: epic_r_r : TTY=pts/0 ; PWD=/home/epic_r_r ; USER=root ; COMMAND=/bin/journalctl -xe
Feb 27 13:07:44 epicRR sudo[5528]: pam_unix(sudo:session): session opened for user root by (uid=0)
Feb 27 13:08:03 epicRR sudo[5528]: pam_unix(sudo:session): session closed for user root
Feb 27 13:08:05 epicRR sudo[5531]: epic_r_r : TTY=pts/0 ; PWD=/home/epic_r_r ; USER=root ; COMMAND=/bin/journalctl -xe
Feb 27 13:08:05 epicRR sudo[5531]: pam_unix(sudo:session): session opened for user root by (uid=0)
lines 3108-3144/3144 (END)
Feb 27 13:07:36 epicRR systemd[1]: Failed to start MySQL Community Server.
-- Subject: Unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit mysql.service has failed.
--
-- The result is RESULT.
Feb 27 13:07:36 epicRR systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
Feb 27 13:07:36 epicRR systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Automatic restarting of the unit mysql.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
Feb 27 13:07:36 epicRR systemd[1]: Stopped MySQL Community Server.
-- Subject: Unit mysql.service has finished shutting down
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit mysql.service has finished shutting down.
Feb 27 13:07:36 epicRR systemd[1]: mysql.service: Start request repeated too quickly.
Feb 27 13:07:36 epicRR systemd[1]: mysql.service: Failed with result 'exit-code'.
Feb 27 13:07:36 epicRR systemd[1]: Failed to start MySQL Community Server.
-- Subject: Unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit mysql.service has failed.
--
-- The result is RESULT.
Feb 27 13:07:44 epicRR sudo[5528]: epic_r_r : TTY=pts/0 ; PWD=/home/epic_r_r ; USER=root ; COMMAND=/bin/journalctl -xe
Feb 27 13:07:44 epicRR sudo[5528]: pam_unix(sudo:session): session opened for user root by (uid=0)
Feb 27 13:08:03 epicRR sudo[5528]: pam_unix(sudo:session): session closed for user root
Feb 27 13:08:05 epicRR sudo[5531]: epic_r_r : TTY=pts/0 ; PWD=/home/epic_r_r ; USER=root ; COMMAND=/bin/journalctl -xe
Feb 27 13:08:05 epicRR sudo[5531]: pam_unix(sudo:session): session opened for user root by (uid=0)
lines 3108-3144/3144 (END)
答案 0 :(得分:0)
这是
的结果systemctl status mysql.service
结果
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: en
Active: failed (Result: exit-code) since Wed 2019-02-27 13:07:36 +0330; 2h 5m
Process: 5521 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exit
Feb 27 13:07:36 epicRR systemd[1]: mysql.service: Service hold-off time over, sc
Feb 27 13:07:36 epicRR systemd[1]: mysql.service: Scheduled restart job, restart
Feb 27 13:07:36 epicRR systemd[1]: Stopped MySQL Community Server.
Feb 27 13:07:36 epicRR systemd[1]: mysql.service: Start request repeated too qui
Feb 27 13:07:36 epicRR systemd[1]: mysql.service: Failed with result 'exit-code'
Feb 27 13:07:36 epicRR systemd[1]: Failed to start MySQL Community Server.