requested_mask / denied_mask errors on Ubuntu with Mysql
I’ve recently set up some new msql-servers that had to fetch their data from a shared mountpoint. I changed the mysql configuration so that it was no longer looking in /var/lib/mysql but in /mounted/mysql. Unfortunately mysql failed to start because of insufficient permissions( type=1503 operation=â€?inode_permissionâ€? requested_mask=â€?rw::â€? denied_mask=â€?rw::â€? name=â€?/mounted/mysql/ibdata1″ pid=7588 profile=â€?/usr/sbin/mysqldâ€? namespace=â€?defaultâ€?
This is caused by apparmor. You need to edit the file /etc/apparmor.d/usr.sbin.mysqld and then look for the lines /var/lib/mysql. Replace this with your path and restart apparmor and mysql.
/etc/init.d/mysql restart