3

I have regular backups of my mysql server.For convenience I set it up as a single Mysql nightly dump. Now I need to restore one of the databases from the dump.

How do I restore a single database from the whole Mysql dump? It is a pretty big file as well. It is about 800mb.

I am on Debian Wheezy 32bit

thanks

3

Use the --one-database option from mysql command.

mysql -u root -p --one-database your_db < full_backup.sql

You first need to create a blank database same name as present in the full_backup.sql which you want to restore.

For more info on --one-database refer to the documentation. http://dev.mysql.com/doc/refman/5.1/en/mysql-command-options.html#option_mysql_one-database

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.