MySQL ne redémarrera pas/ne redémarrera pas après le redémarrage du serveur. Aucun fichier de configuration n'a été modifié/aucune modification n'a été effectuée. J'ai le même problème que ce question où AppArmor est à l'origine de ces entrées du journal:mysql ne démarre pas Ubuntu 16.04.2 x64
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
Lorsque ces execptions sont ajoutés à /etc/apparmor.d/usr.sbin.mysqld
comme:
# fix issue with mysql not restarting
/proc/*/status r,
/sys/devices/system/node/ r,
/sys/devices/system/node/node0/meminfo r,
# Allow network access
Puis en tant que root: service apparmor reload; service mysql restart;
Les journaux n'affichent plus que:
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
Je n'ai apporté aucune modification à la configuration, donc je ne sais pas vraiment où chercher. J'allais réinstaller MySQL, cependant, j'ai données que je ne l'ai pas sauvegardés :(pls aider
J'ai essayé de réinstaller mysql-server mais j'ai toujours une seule erreur: 'mysql.service: Processus principal quitté, code = quitté, status = 1/FAILURE' – jwtea