Import A Single Database From A Mysqldump Backup

Last modified: 
Friday, March 27th, 2015

How to import a single database from a Mysqldump --all-databases backup

The following will import a single database from a mysqldump --all-databases dump file. Note that ''mydatabase'' has to exist prior to running the import.

mysql -u mydbuser -p -D mydatabase -o < all-databases.sql


The operator of this site makes no claims, promises, or guarantees of the accuracy, completeness, originality, uniqueness, or even general adequacy of the contents herein and expressly disclaims liability for errors and omissions in the contents of this website.