title: MySQL Create DB If Not Exists With File Import Command Line
body: <p>So I'm using a command like:</p>
  
  <pre><code>mysql db &lt; db.sql
  </code></pre>
  
  <p>But whenever I do this with a DB that doesn't already exist, it errors.</p>
  
  <p>Is there a command flag to add to that to create the DB if it doesn't exist?
  Or a line of code to insert into the start of the file?</p>
  
  <p>TIA.</p>