Upgraded to Ubuntu 16.04 from 14.04 x64
If I try to start mysqld
it fails and in the syslog I have
kernel: [ 2336.792423] audit: type=1400 audit(1470265086.730:518): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=11850 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=117 ouid=0
I added /run/systemd/notify/
to apparmor, but I cannot add run/systemd/notify
- "/" is missing
How can I fix this? I need MariaDB to run on a separate partition
I am using MariaDB with data folder on /home/db/mysql
I had a symlink configured to point to it from
lrwxrwxrwx 1 mysql mysql 14 iun 22 20:58 /var/lib/mysql -> /home/db/mysql
and also had app armor profile configured:
# vim:syntax=apparmor
# Last Modified: Tue Jun 19 17:37:30 2007
#include <tunables/global>
/usr/sbin/mysqld {
#include <abstractions/base>
#include <abstractions/nameservice>
#include <abstractions/user-tmp>
#include <abstractions/mysql>
#include <abstractions/winbind>
capability dac_override,
capability sys_resource,
capability setgid,
capability setuid,
network tcp,
/etc/hosts.allow r,
/etc/hosts.deny r,
/etc/mysql/*.pem r,
/etc/mysql/conf.d/ r,
/etc/mysql/conf.d/* r,
/etc/mysql/*.cnf r,
/usr/lib/mysql/plugin/ r,
/usr/lib/mysql/plugin/*.so* mr,
/usr/sbin/mysqld mr,
/usr/share/mysql/** r,
/var/log/mysql.log rw,
/var/log/mysql.err rw,
/var/lib/mysql/ r,
/var/lib/mysql/** rwk,
/var/log/mysql/ r,
/var/log/mysql/* rw,
/var/run/mysqld/mysqld.pid rw,
/var/run/mysqld/mysqld.sock w,
/run/mysqld/mysqld.pid rw,
/run/mysqld/mysqld.sock w,
/run/systemd/notify w,
/home/db/** rwk,
/home/db/mysql/** rwk,
/sys/devices/system/cpu/ r,
# Site-specific additions and overrides. See local/README for details.
#include <local/usr.sbin.mysqld>
}
It previously failed on cd to /home/db/mysql
, but fixed it by editing the /lib/systemd/system/mariadb.service
and setting ProtectHome=false