首页 > 解决方案 > 无法在ubuntu中启动mysql

问题描述

我尝试了以下代码来重新启动 MySql 服务

sudo service mysql restart 

收到以下错误

mysql.service 的作业失败,因为控制进程以错误代码退出。有关详细信息,请参阅“systemctl status mysql.service”和“journalctl -xe”。ubuntu@ip-172-31-52-10:~$ journalctl -xe

journalctl 日志说

    Unit mysql.service has begun starting up.
Mar 17 15:10:55 ip-172-31-52-10 audit[4057]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=4057 comm="mysqld" r
Mar 17 15:10:55 ip-172-31-52-10 kernel: audit: type=1400 audit(1552835455.957:54): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/syst
Mar 17 15:10:56 ip-172-31-52-10 mysql-systemd-start[4038]: ERROR: Unable to start MySQL server:
Mar 17 15:10:56 ip-172-31-52-10 mysql-systemd-start[4038]: 2019-03-17T15:10:56.000286Z 0 [ERROR] unknown variable 'bind=0.0.0.0'
Mar 17 15:10:56 ip-172-31-52-10 mysql-systemd-start[4038]: 2019-03-17T15:10:56.004319Z 0 [ERROR] Aborting
Mar 17 15:10:56 ip-172-31-52-10 mysql-systemd-start[4038]: Please take a look at https://wiki.debian.org/Teams/MySQL/FAQ for tips on fixing common upgrade issues.
Mar 17 15:10:56 ip-172-31-52-10 mysql-systemd-start[4038]: Once the problem is resolved, restart the service.
Mar 17 15:10:56 ip-172-31-52-10 systemd[1]: mysql.service: Control process exited, code=exited status=1
Mar 17 15:10:56 ip-172-31-52-10 systemd[1]: mysql.service: Failed with result 'exit-code'.
Mar 17 15:10:56 ip-172-31-52-10 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.
Mar 17 15:10:56 ip-172-31-52-10 systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
Mar 17 15:10:56 ip-172-31-52-10 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.
Mar 17 15:10:56 ip-172-31-52-10 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.
Mar 17 15:10:56 ip-172-31-52-10 systemd[1]: mysql.service: Start request repeated too quickly.
Mar 17 15:10:56 ip-172-31-52-10 systemd[1]: mysql.service: Failed with result 'exit-code'.
Mar 17 15:10:56 ip-172-31-52-10 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.

我该如何解决?

标签: mysqlubuntu

解决方案


推荐阅读