mysql不会启动ubuntu 16.04.2 x64



,因此MySQL不会在服务器重新启动后重新启动/启动。没有编辑文件/进行任何更改。我有与这个问题相同的问题。

Sep 27 11:18:53 staging audit[2986]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/2986/status" pid=2986 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=112 ouid=112
Sep 27 11:18:53 staging audit[2986]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=2986 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=112 ouid=0
Sep 27 11:18:53 staging audit[2986]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/2986/status" pid=2986 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=112 ouid=112

当将这些执行添加到/etc/apparmor.d/usr.sbin.mysqld时AS:

# fix issue with mysql not restarting
  /proc/*/status r,
  /sys/devices/system/node/ r,
  /sys/devices/system/node/node0/meminfo r,
# Allow network access

然后作为root: service apparmor reload; service mysql restart;

日志现在仅显示:

Sep 27 11:25:10 staging 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.
Sep 27 11:25:10 staging systemd[1]: mysql.service: Unit entered failed state.
Sep 27 11:25:10 staging systemd[1]: mysql.service: Failed with result 'exit-code'.
Sep 27 11:25:10 staging systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
Sep 27 11:25:10 staging systemd[1]: Stopped MySQL Community Server.
-- Subject: Unit mysql.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit mysql.service has finished shutting down.
Sep 27 11:25:10 staging systemd[1]: Starting MySQL Community Server...
-- Subject: Unit mysql.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit mysql.service has begun starting up.
Sep 27 11:25:11 staging systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE

我没有进行任何配置更改,因此我真的不知道其他地方要看。我要重新安装mysql,但是,我有我没有备份的数据:( PLS帮助

您是否尝试过为Ubuntu 16.04和UP

  sudo systemctl start mysql

所以我设法使它起作用,尽管我不知道这是如何工作的,但是我跑了: apt-get remove mysql*; apt-get install mysql-server mysql-client ;我第一次仍然无法启动mysql。然后我再次运行,MySQL再次开始工作。我也能够删除这些行:

/proc/*/status r, /sys/devices/system/node/ r, /sys/devices/system/node/node0/meminfo r,

来自/etc/apparmor.d/usr.sbin.mysqld并重新加载Apparmor。

相关内容

  • 没有找到相关文章

最新更新