AppArmor
If AppArmor is running, and mysql or apache2 data directories are other as the default, this must be changed in the apparmor config too.
See https://askubuntu.com/questions/916009/mysql-wont-start-because-of-apparmor
SELinux enabled
The sestatus
command provides a configurable view into the status of SELinux. The simplest form of this command shows the following information:
[root@localhost ~]# sestatus SELinux status: enabled SELinuxfs mount: /selinux Current mode: enforcing Mode from config file: enforcing Policy version: 21 Policy from config file: targeted
If SELinux is enabled, the corresponding ACL labels has to be added to the translate5 writeable files/directories.
...