title: Shell script to connect to MySQL server
body: <p>I have about 20 different MySQL instances that I'd like to easily connect to without having to input the whole address, username, and crazy long password each time. What can I do to script this process, so all I have to do is run one .sh script for each instance?</p>
  
  <p>What I have so far, saved as "instance1.sh"</p>
  
  <pre><code>#!/bin/bash
  mysql -h instance1-address.com -u username -p password -e "show databases"
  </code></pre>
  
  <p>After making this file executable, it still asks for my password, even though it is in the script itself. What can I do?</p>