title: how import a mysqldump file locally
body: <p>I want to import an sqldump file in my database "dbname" into the table "data" without using the network interface.</p>
  
  <p>when i import the file via</p>
  
  <pre><code>mysql dbname -u databaseuser -pdatabasepass&lt;data.sql
  </code></pre>
  
  <p>this is <strong>really</strong> slow on my ubuntu 12.04</p>
  
  <p>but when i use this instead:</p>
  
  <pre><code>mysqlimport -u databaseuser -pdatabasepass --local data.sql
  </code></pre>
  
  <p>it is as fast as normal.</p>
  
  <p>i think, because on my mashine it is parsing each line separately when using "mysql" and "&lt;"</p>
  
  <p>is there a way to use the mysqlimport syntax for importing an sql-file with CREATE and DROP TABLE stuff?</p>
  
  <p>maybe just split the upper part in the sql-dump (with the drop table and create table statement) automatically and then only send the rest of the file with the INPUT-statements to mysqlinsert, that should work</p>