title: How do I import data from a .bat file in MySQL?
body: <p>I created a .bat file (import_file.bat):</p>
  
  <pre><code>set database_name=nome_db
  mysql –u root --password=pass --database %database_name% &lt; c:/import_geco/sql_svuta.sql
  mysql –u root --password=pass --database %database_name% &lt; c:/import_geco/carica_dati.sql
  </code></pre>
  
  <p>From the command line, in the MySQL bin directory I entered:</p>
  
  <pre><code>mysql/bin&gt;c:/import_db/import_file.bat
  </code></pre>
  
  <p>... but it doesn't work, instead it returns MySQL help info.</p>
  
  <p>If I create a .bat file to export table (export.bat):</p>
  
  <pre><code>mysqldump --no-create-info -u root nome_db nome_tabella  &gt; c:/backup_db/export.sql
  </code></pre>
  
  <p>... and enter at the command line:</p>
  
  <pre><code>mysql/bin&gt;c:/import_db/export.bat
  </code></pre>
  
  <p>it works.</p>