Ubuntu MySQL 无法启动?

Ubuntu MySQL 无法启动?

好的,我一直在尝试寻找修复此问题的方法,但每当我输入“service mysql restart”或“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.

执行命令“systemctl status mysql.service”后,我得到以下信息:

Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled
Active: activating activating (start-post) (Result: exit-code) since Mon 2016-08-08 21:30:55 CEST; 15
Process: 17334 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
Process: 17332 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0
Main PID: 17334 (code=exited, status=1/FAILURE);         : 17335 (mysql-systemd-s)
CGroup: /system.slice/mysql.service
       └─control
         ├─17335 /bin/bash /usr/share/mysql/mysql-systemd-start post
         └─17450 sleep 1

现在我对 ubuntu 不是很了解,所以我真的不知道这里发生了什么,这真的很尴尬......

如果有帮助的话,我还将发布 journalctl -xe :)

Aug 08 21:45:09 serenitypvp systemd[1]: Failed to start MySQL Community Server.
-- Subject: Unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has failed.
--
-- The result is failed.
Aug 08 21:45:09 serenitypvp systemd[1]: mysql.service: Unit entered failed state.
Aug 08 21:45:09 serenitypvp systemd[1]: mysql.service: Failed with result 'exit-code'.
Aug 08 21:45:09 serenitypvp systemd[1]: mysql.service: Service hold-off time over, scheduling

任何帮助都将不胜感激,谢谢!

答案1

我遇到了同样的问题并调查了/var/log/mysql/error.log,然后发现我使用了无效的变量名(所以,在我的情况下,错误是[ERROR] unknown variable 'mywrongvar=value'

相关内容