Split a large MySQL dump per database I have a large MySQL data backup file which consists all the databases. But I want to restore only a few number of databases from above. 

Is there a good way to split the sql file into several files per database?
Without splitting you can restore specific database using this command

 mysql -u root -p --one-database database_name &lt; main-db-dump.sql 


First create the database. Then apply this command with correct database_name. Follow the steps for each database.