MySQL won't start because of AppArmor?

You need to edit your apparmor configuration to let MySQL access those files. The log messages are telling you that /usr/sbin/mysqld needs read (r) access to open /proc/14767/status, /sys/devices/system/node/ (trailing slash because it wants to read the directory), and /proc/14767/task/14767/mem. The file to edit is /etc/apparmor.d/usr.sbin.mysqld.

In my case I solved the problem by adding these lines somewhere in the middle (with two spaces in front of each):

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

(Note the trailing slash for the second line.)

After doing that, try starting MySQL, and if you get more errors, add those files too and try again.

Here is an answer I gave to this problem elsewhere.


It may be this: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=739846 so try using

echo "exit 0" >> /etc/init.d/mysql
dpkg --configure -a

if it's not helping use:

sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-5.5
sudo apt-get install mysql-server

to completly remove your mysql and reinstall Warning: If you have any databases they will be removed.


I solved this issue with this:

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

Add the following lines:

/data/ r,
/data/** rwk,

reload apparmor service

sudo service apparmor reload