1

我正在尝试更改 Ubuntu 18.04 上的 Mysql 数据目录。我在这里遵循了确切的说明:https ://www.digitalocean.com/community/tutorials/how-to-move-a-mysql-data-directory-to-a-new-location-on-ubuntu-18 -04

但是当我走到这一步时:

sudo systemctl restart apparmor

我收到以下错误:

Job for apparmor.service failed because the control process exited with error code.
See "systemctl status apparmor.service" and "journalctl -xe" for details.

systemctl status apparmor.service 的输出是:

apparmor.service - AppArmor initialization
   Loaded: loaded (/lib/systemd/system/apparmor.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2019-08-23 09:34:03 CEST; 41s ago
     Docs: man:apparmor(7)
           http://wiki.apparmor.net/
  Process: 18786 ExecStart=/etc/init.d/apparmor start (code=exited, status=123)
 Main PID: 18786 (code=exited, status=123)

Aug 23 09:34:03 toto-X777K apparmor[18786]: Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox
Aug 23 09:34:03 toto-X777K apparmor[18786]: AppArmor parser error for /etc/apparmor.d/usr.sbin.mysqld in /etc/apparmor.d/usr.sbin.mysqld at 
Aug 23 09:34:03 toto-X777K apparmor[18786]: Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
Aug 23 09:34:03 toto-X777K apparmor[18786]: Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox
Aug 23 09:34:03 toto-X777K apparmor[18786]: AppArmor parser error for /etc/apparmor.d/usr.sbin.mysqld in /etc/apparmor.d/usr.sbin.mysqld at 
Aug 23 09:34:03 toto-X777K apparmor[18786]: Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
Aug 23 09:34:03 toto-X777K apparmor[18786]:    ...fail!
Aug 23 09:34:03 toto-X777K systemd[1]: apparmor.service: Main process exited, code=exited, status=123/n/a
Aug 23 09:34:03 toto-X777K systemd[1]: apparmor.service: Failed with result 'exit-code'.
Aug 23 09:34:03 toto-X777K systemd[1]: Failed to start AppArmor initialization.

journalctl -xe 的输出是:

Aug 23 09:34:03 toto-X777K audit[18902]: AVC apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/snap/core/7396/usr/li
Aug 23 09:34:03 toto-X777K audit[18902]: AVC apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/snap/core/7396/usr/li
Aug 23 09:34:03 toto-X777K audit[18903]: AVC apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile=
Aug 23 09:34:03 toto-X777K audit[18904]: AVC apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile=
Aug 23 09:34:03 toto-X777K audit[18905]: AVC apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile=
Aug 23 09:34:03 toto-X777K audit[18907]: AVC apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile=
Aug 23 09:34:03 toto-X777K audit[18906]: AVC apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile=
Aug 23 09:34:03 toto-X777K audit[18908]: AVC apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile=
Aug 23 09:34:03 toto-X777K audit[18909]: AVC apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile=
Aug 23 09:34:03 toto-X777K audit[18912]: AVC apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile=
Aug 23 09:34:03 toto-X777K audit[18913]: AVC apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile=
Aug 23 09:34:03 toto-X777K audit[18911]: AVC apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile=
Aug 23 09:34:03 toto-X777K audit[18910]: AVC apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile=
Aug 23 09:34:03 toto-X777K audit[18914]: AVC apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile=
Aug 23 09:34:03 toto-X777K audit[18915]: AVC apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile=
Aug 23 09:34:03 toto-X777K audit[18919]: AVC apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile=
Aug 23 09:34:03 toto-X777K audit[18920]: AVC apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile=
Aug 23 09:34:03 toto-X777K audit[18916]: AVC apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile=
Aug 23 09:34:03 toto-X777K audit[18917]: AVC apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile=
Aug 23 09:34:03 toto-X777K audit[18921]: AVC apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile=
Aug 23 09:34:03 toto-X777K audit[18923]: AVC apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile=
Aug 23 09:34:03 toto-X777K audit[18922]: AVC apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile=
Aug 23 09:34:03 toto-X777K audit[18918]: AVC apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile=
Aug 23 09:34:03 toto-X777K apparmor[18786]:    ...fail!
Aug 23 09:34:03 toto-X777K systemd[1]: apparmor.service: Main process exited, code=exited, status=123/n/a
Aug 23 09:34:03 toto-X777K systemd[1]: apparmor.service: Failed with result 'exit-code'.
Aug 23 09:34:03 toto-X777K systemd[1]: Failed to start AppArmor initialization.
-- Subject: Unit apparmor.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--  
-- Unit apparmor.service has failed.
-- 
-- The result is RESULT.
Aug 23 09:34:03 toto-X777K sudo[18781]: pam_unix(sudo:session): session closed for user root
lines 1022-1056/1056 (END)

请问您有什么建议可以解决这个问题吗?

4

0 回答 0