title: Any way to disable foreign key checks with mysqlimport tab option?
body: <p>I asked <a href="https://stackoverflow.com/questions/15938786/disabling-foreign-key-checks-on-the-command-line">this question</a> before and I am just coming back to the issue.</p>
  
  <blockquote>
    <p>I have a backup script for my MySQL database, using <code>mysqldump</code> with the <code>--tab</code> option so it produces a <code>.sql</code> file for the structure and a <code>.txt</code> file (pipe-separated) for the content.</p>
  </blockquote>
  
  <p>The answer on the linked question works when importing SQL files (the table structure), but I also get the foreign key constraint error when importing some tables (because the table has a foreign key to itself). The two commands are like this:</p>
  
  <pre><code>cat &lt;(echo "SET FOREIGN_KEY_CHECKS=0;") "table.sql" | mysql [user/pass] database
  mysqlimport [user/pass] --local --fields-terminated-by="|" database "table.txt"
  </code></pre>
  
  <p>It looks like this has been <a href="http://bugs.mysql.com/bug.php?id=19996" rel="nofollow noreferrer">requested years ago on their bug tracker</a> but never implemented. Is there any way around it?</p>
  
  <p>Note that I want to continue using the tab option for various reasons (it's faster, and works better with git as each row is on a separate line).</p>