title: How to connect to mysql and to pass credentials on Jenkins freestyle job
body: <p>I am trying to connect to a remote MySQL Server from a Jenkins job. </p>
  
  <p>I bound the MySQL user credentials into two variables <code>MYSQL_USERNAME</code> and <code>MYSQL_PASSWORD</code>. I need to SSH first, and then connect to MySQL. The shell command I used is:</p>
  
  <p><code>ssh remote_server mysql --user="$MYSQL_USERNAME" --password="$MYSQL_PASSWORD" -e "SHOW DATABASES;"</code></p>
  
  <p>(Build Step-> Execute shell)(quotes only for --user, --password and -e)</p>
  
  <p>Summary of Error:
  Using MySQL credentials on command line is insecure, and I get whole mysql help commands. </p>
  
  <p>Any help is appreciated.</p>