我刚刚将 mysql-server 更新到 5.5.35-0ubuntu0.12.04.1,MySQL 不再重新启动。dmesg
显示以下错误:
[ 832.490460] type=1400 audit(1392612759.575:31): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=16498 comm="apparmor_parser"
[ 832.543672] type=1400 audit(1392612759.627:32): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=16532 comm="apparmor_parser"
[ 833.740580] init: mysql main process (16544) terminated with status 1
[ 833.740615] init: mysql main process ended, respawning
[ 834.687079] init: mysql post-start process (16545) terminated with status 1
[ 834.695901] type=1400 audit(1392612761.779:33): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=16622 comm="apparmor_parser"
[ 835.889156] init: mysql main process (16643) terminated with status 1
[ 835.889203] init: mysql main process ended, respawning
[ 836.763574] init: mysql post-start process (16644) terminated with status 1
[ 836.773149] type=1400 audit(1392612763.859:34): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=16724 comm="apparmor_parser"
[ 837.928074] init: mysql main process (16736) terminated with status 1
[ 837.928110] init: mysql respawning too fast, stopped
似乎 AppArmor 不允许mysqld
重新启动。我不太了解 apparmor 的工作原理,也不知道如何解决这个问题。有人能帮忙吗?
答案1
这个 AskUbuntu 问答听起来像您的问题,标题为:无法启动 mysql - mysql 重生太快,已停止。
摘自该答案
运行以下命令:
# Miraz added dpkg-reconfigure dpkg-reconfigure mysql-server-5.5
但请确保没有安装旧的 mysql 版本,如果有请删除:
# Miraz quick mysql package check dpkg -l *mysql*