MySQL recovery


The Backup Manager lets you restore the MySQL databases it has backed up. The minimal restore unit is a database (it isn't possible to restore a particular file or table from it).


You can recover MySQL to either of the following:



  • To the original location. In this case the Backup Manager should be able to stop the MySQL server being restored (if it's running).

  • To a new location. In this case you will need to move the files to an appropriate folder where MySQL can recognize them. Please do not forget to stop the MySQL server before doing it.



Starting the MySQL server on Security-Enhanced Linux after recovery


SELinux may prevent the MySQL Server Daemon from accessing the database files after recovery. It results in error #13: Can't open the mysql.plugin table. Please run mysql_upgrade to create it.


To resolve the error, you should reset the security context of the database files using the restorecon program.


restorecon -Rv /var/lib/mysql

It may also be necessary to repeat the command for other files and directories which have been restored.


Use the man restorecon command to get additional information about restorecon.