Home » » How to dump and restore mySQL databases

How to dump and restore mySQL databases

Written By 1 on Wednesday, April 27, 2011 | 10:17 PM


How to dump and restore mySQL databases

You can get mysql dump in .sql format, just read it:

Go to /var/lib/mysql:
# cd /var/lib/mysql
Search for the database that you want:
# ls -l grep database_name
Dump it:
# mysqldump database_name > database.sql
If you want to restore on the same or other server:
# cd /var/lib/mysql
Check the database name where you want to restore the mysqldump:
# ls -l grep db_name
#
 mysql database_name <>database.sql

0 Comment:

Post a Comment