Import single database from –all-databases dump

on February 7th, 2017 by Hades | No Comments »

Sometimes you can appear a question: “Is it possible to import a single database from an –all-databases mysqldump?”. Yeah, it’s possible…

You can provide the desired database in the command line and skip the commands against the other databases using:

–disable-keys for avoid errors of foreign keys
-o, –one-database Ignore statements except those that occur while the default database is the one named at the command line.
-D, –database=name Database to use.