Fix permissions after changing MySQL data directory








  • sudo vi /etc/apparmor.d/usr.sbin.mysqld
    /path/to/new_mysql_data_dir/ r,
    /path/to/new_mysql_data_dir/** rwk,
  • sudo chown -R mysql:mysql /path/to/new_mysql_data_dir/
  • sudo /etc/init.d/apparmor restart
    sudo /etc/init.d/mysql restart



No comments:

Post a Comment