Apparmor DENIED Mysql

Asked

Viewed 1,343 times

1

Personal hail.

I am facing a small problem with my MYSQL on Linux Mint. When I try to initialize the service, APPARMOR denies me permission, follows the logs:

Ago 28 09:07:42 Comerlatto-NTB systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
Ago 28 09:07:42 Comerlatto-NTB systemd[1]: Stopped MySQL Community Server.
-- Subject: A unidade mysql.service concluiu o desligamento
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- A unidade mysql.service concluiu o desligamento.
Ago 28 09:07:42 Comerlatto-NTB systemd[1]: Starting MySQL Community Server...
-- Subject: Unidade mysql.service sendo iniciado
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- A unidade mysql.service está sendo iniciada.
Ago 28 09:07:42 Comerlatto-NTB audit[31015]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/31015/status" pid=31015 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=122 ouid=122
Ago 28 09:07:42 Comerlatto-NTB audit[31015]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=31015 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=122 ouid=0
Ago 28 09:07:42 Comerlatto-NTB audit[31015]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/31015/status" pid=31015 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=122 ouid=122
Ago 28 09:07:42 Comerlatto-NTB kernel: audit: type=1400 audit(1503922062.148:231): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/31015/status" pid=31015 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=122 ouid=122
Ago 28 09:07:42 Comerlatto-NTB kernel: audit: type=1400 audit(1503922062.148:232): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=31015 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=122 ouid=0
Ago 28 09:07:42 Comerlatto-NTB kernel: audit: type=1400 audit(1503922062.148:233): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/31015/status" pid=31015 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=122 ouid=122
Ago 28 09:07:42 Comerlatto-NTB systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE

● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: activating (start-post) (Result: exit-code) since Seg 2017-08-28 09:10:14 BRT; 15s ago
  Process: 31784 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
  Process: 31777 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
 Main PID: 31784 (code=exited, status=1/FAILURE);         : 31785 (mysql-systemd-s)
    Tasks: 2
   Memory: 344.0K
      CPU: 245ms
   CGroup: /system.slice/mysql.service
           └─control
             ├─31785 /bin/bash /usr/share/mysql/mysql-systemd-start post
             └─31849 sleep 1

Ago 28 09:10:14 Comerlatto-NTB systemd[1]: Starting MySQL Community Server...
Ago 28 09:10:14 Comerlatto-NTB systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE

Would anyone know what it could be? In my lay view APPARMOR is denying reading access, I have searched in several forums and no solution helped me.

  • Solved? I’m going through it. Hug.

  • 1

    I reinstalled Mysql

2 answers

1

The general guidance indicated to solve this problem is in changing the charge permission of apparmour.

Note the message indicating which feature lacked permission and which permission you requested:

Aug 28 09:07:42 Comerlatto-NTB Audit[31015]: AVC apparmor="DENIED" Operation="open" profile="/usr/sbin/mysqld" name="/proc/31015/status" pid=31015 com="mysqld" requested_mask="r" denied_mask="r" fsuid=122 Ouid=122

Edit the file

/etc/apparmor. d/usr.sbin.mysqld

and include the necessary permissions in the case:

/proc/* r,
/sys/devices/system/node/* r

Restart your service:

sudo service mysql stop
sudo service mysql start
  • 1

    Thanks for the answer, at the time I thought of this problem I followed these same guidelines, restarted mysql, as well as the machine, but did not solve. The problem persisted until the moment I reinstalled Mysql

0

Oops! Personal Beauty? I was looking for a solution to this same problem and noticed something interesting, in my case I noticed an error message indicating lack of disk space in the output of the command journaul -xe. I increased the server disk space and solved.

Follow the exit of the command:

Nov 21 08:38:01 ip-192-168-231-20 rsyslogd[880]: action 'action 3' (module 'builtin:omfile') message lost, could not be processed. Check for additional error messa
Nov 21 08:38:01 ip-192-168-231-20 rsyslogd[880]: file '7' write error: No space left on device [v8.32.0 try http://www.rsyslog.com/e/2027 ]

I had tried these same alternatives cited above and did not solve, the problem in my case was disk space. I hope I can help!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.