Alex, your approach is totally correct. If you need to add additional access to files, updating the AppArmor profile is the correct way to do that.
For people who prefer to adjust the profile directly instead of using aa-logprof (which is totally legitimate), you can adjust /etc/apparmor.d/usr.sbin.mysqld directly, followed by:
$ sudo apparmor_parser -r -W -T /etc/apparmor.d/usr.sbin.mysqld
Or on Jaunty and earlier:
$ sudo apparmor_parser -r /etc/apparmor.d/usr.sbin.mysqld
Alex, your approach is totally correct. If you need to add additional access to files, updating the AppArmor profile is the correct way to do that.
For people who prefer to adjust the profile directly instead of using aa-logprof (which is totally legitimate), you can adjust /etc/apparmor. d/usr.sbin. mysqld directly, followed by: d/usr.sbin. mysqld
$ sudo apparmor_parser -r -W -T /etc/apparmor.
Or on Jaunty and earlier: d/usr.sbin. mysqld
$ sudo apparmor_parser -r /etc/apparmor.