Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am having command to restore all databases from full dump taken by enterprise full backup .Can anyone help me how to restore single database from full dump .

share|improve this question
The table you want to restore is InnoDB or MyISAM? Because there are different approaches depending the engine – Cristian Porta Jul 24 '14 at 5:02

Try this:

mysql -u root -p --one-database destdbname < alldatabases.sql

In the above code substitute destdbname with the database name you want to restore, and alldatabases.sql with the name of your full DB backup.

If you would rather just extract the database dump of the single database from the --all-databases dump file, you can do this with sed using this command:

sed -n '/^-- Current Database: `dbname`/,/^-- Current Database: `/p' alldatabases.sql > output.sql

Where dbname is replaced with the database name of the database to extract, and alldatabases.sql is the name of your dump file. The result will be saved into the file output.sql.

share|improve this answer
MySQL Enterprise Backup does not launch mysqldumps, so you cannot restore it like data in is a mysqldump. – RolandoMySQLDBA Mar 17 '14 at 21:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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