title: Can you automatically create a mysqldump file that doesn't enforce foreign key constraints?
body: <p>When I run a mysqldump command on my database and then try to import it, it fails as it attempts to create the tables alphabetically, even though they may have a foreign key that references a table later in the file.  There doesn't appear to be anything in the <a href="http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html" rel="noreferrer">documentation</a> and I've found answers like <a href="https://stackoverflow.com/questions/1382583/foreign-key-constraints-while-dumping-data/1382610#1382610">this</a> that say to update the file after it's created to include:</p>
  
  <pre><code>set FOREIGN_KEY_CHECKS = 0;
  ...original mysqldump file contents...
  set FOREIGN_KEY_CHECKS = 1;
  </code></pre>
  
  <p>Is there no way to automatically set those lines or export the tables in the necessary order (without having to manually specify all table names as that can be tedious and error prone)?  I could wrap those lines in a script, but was wondering if there is an easy way to ensure I can dump a file and then import it without manually updating it.</p>