Ubuntu Linux: Disable Apparmor For Specific Profile / Service Such As Mysqld Server

To disable AppArmor for a specific profile, such as the MySQL server, on Ubuntu Linux, you can use the following steps:

  1. Stop the service that is protected by the profile you want to disable:
sudo service mysqld stop
  1. Disable the AppArmor profile for the service:
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
  1. Start the service again:
sudo service mysqld start

Note that disabling AppArmor protection for a service can make the system less secure, so it should only be done if necessary for a specific task and with a full understanding of the implications.

Leave a Comment