Today try to move the path of mysql to new one , because on ec2 I was left without space.
Well I have stopped the mysqld copy files modity the my.cnf with new datadir but when try to start .. well didn’t started .. After a little dmesg search see that on ubuntu is apparmor .
Try to make alias into file /etc/mysql/mysql.conf.d/mysqld.cnf but didn’t resolve the problem
Find out that you have to edit also /etc/apparmor.d/usr.sbin.mysqld
and add
/db/data/mysql r
/db/data/mysql** rwk
After this mysqld started with new path.