title: Cannot import SQL file when the database name contains an underscore
body: <p>I'm attempting to import an SQL file into a MySQL database using the following command;</p>
  
  <pre><code>mysql --user example -p --database example_database &lt; example.sql
  </code></pre>
  
  <p>This returns the error:</p>
  
  <pre><code>ERROR 1044 (42000) at line 22: Access denied for user 'example'@'%' to database 'example'
  </code></pre>
  
  <p>Notice the database name has trimmed everything after the underscore. The connection details are definitely correct as I can connect to MySql using the following command:</p>
  
  <pre><code>mysql --user example -p --database example_database
  </code></pre>
  
  <p>Any ideas why this is happening?</p>