MySQL - Order of Table Load From Backup
Usually yes, when foreign keys are involved, you have to create them in the right order. 

When you are sure, however, that your data is consistent, you can do it like this:

mysql&gt; USE your_schema;
mysql&gt; SET FOREIGN_KEY_CHECKS=0;
mysql&gt; SOURCE /path/to/your/dump/file1.sql
mysql&gt; SOURCE /path/to/your/dump/file2.sql
mysql&gt; # ...
mysql&gt; SET FOREIGN_KEY_CHECKS=1;


Or on the command line:

shell&gt; mysql -uuser your_schema -e "SET GLOBAL FOREIGN_KEY_CHECKS=0;"
shell&gt; cat file1.sql file2.sql | mysql -uuser your_schema
shell&gt; mysql -uuser your_schema -e "SET GLOBAL FOREIGN_KEY_CHECKS=1;"