title: A better way to execute multiple MySQL commands using shell script
body: <p>I would like to write a *.sh script to execute multiple MySQL commands.</p>
  <p>Currently, what I can do is something like the following</p>
  <pre><code>mysql -h$host -u$user -p$password -e &quot;drop database $dbname;&quot;
  mysql -h$host -u$user -p$password -e &quot;create database $dbname;&quot;
  mysql -h$host -u$user -p$password -e &quot;another MySQL command&quot;
  ...
  </code></pre>
  <p>Is there a way to avoid typing <code>mysql -h$host -u$user -p$password -e</code> every time I want to execute a MySQL command?</p>