From Fedora Project Wiki
(Created page with "For restoring backed-up data choose one of the methods bellow, depending which way you have chosen for back-up. == Restoring from a dump file == Suppose you have backed-up d...") |
No edit summary |
||
Line 25: | Line 25: | ||
# restoreconf -r /var/lib/mysql | # restoreconf -r /var/lib/mysql | ||
</pre> | </pre> | ||
== Expected results == | |||
After starting the database daemon the data will work. |
Revision as of 20:59, 23 April 2013
For restoring backed-up data choose one of the methods bellow, depending which way you have chosen for back-up.
Restoring from a dump file
Suppose you have backed-up data into a dump file backup.sql
Prerequisities
- make sure a user you are connecting to a database under has enough privileges to create all backed-up tables
Restoring the data
$ mysql -u root -p < backup.sql
Restoring from copied binary files
Suppose you have copied the data stack to a location /save/directory/mysql. We should also pay attention on SELinux context, so running restoreconf
is a good idea.
# cp -r /save/directory/mysql /var/lib/mysql # restoreconf -r /var/lib/mysql
Expected results
After starting the database daemon the data will work.