Restoring a single database from a MySQL dump

If you, like me, happen to end up with a mysqldump –all-databases dump file and need to restore a single database, here’s how (replace Target with your database name):

Note the use of -o instead of output redirection (>), since it’s locale independent. If you have seem to have a charset mismatch, say UTF-8 - ISO-8859-1 issues, convert the dump using iconv.


Add a comment