You'll need to add a rule in /etc/apparmor.d/usr.sbin.mysqld to allow mysqld access to your chosen datadir. Something like
/opt/mysqld/** rwk,
underneath the line:
/var/lib/mysqld/* rwk,
You'll need to add a rule in /etc/apparmor. d/usr.sbin. mysqld to allow mysqld
access to your chosen datadir. Something like
/opt/mysqld/** rwk,
underneath the line:
/var/lib/mysqld/* rwk,