Move mysql datadir : errno 13

If you are using Mysql with Ubuntu, be careful with apparmor when you move your mysql datadir.

If you’re symlinking to databases outside /var/lib/mysql and you’re getting unexpected “(errno: 13)” (permission denied) errors, check your MySQL settings for AppArmor (particularly on Ubuntu as of 8.04) or SELinux. Specifically, make sure your new path is listed in /etc/apparmor.d/usr.sbin.mysqld then restart apparmor.

source

Leave a Reply

Your email address will not be published. Required fields are marked *