In case you are bitten by this bug, the solution is given as a suggestion in the bug report (all of these have to be done as root, so either with sudo -i
as a zeroth command or with sudo
prefixed):
echo "/usr/sbin/mysqld { }" > /etc/apparmor.d/usr.sbin.mysqld
(the second part with sudo is... | sudo tee /etc/apparmor.d/usr.sbin.mysqld
, thank you @dvlcube)apparmor_parser -v -R /etc/apparmor.d/usr.sbin.mysqld
systemctl restart mariadb
Background
If you previously had MySQL installed, it activated an AppArmor profile which is incompatible with MariaDB. apt-get remove --purge
only removes the profile, but does not deactivate/unload it. Only manually unloading it lets MariaDB work unhindered by AppArmor.