title: scripting MySQL from BASH over SSH
body: <p>I have a CentOS server that I want to script from BASH running it on my laptop.</p>
  <p>I want to run a script locally that:</p>
  <ul>
  <li>logs into the server over ssh and executes some MySQL statements</li>
  <li>copies files that I need to where I need them</li>
  </ul>
  <p>The file copying is easy. I can do that.</p>
  <p>But how can one connect to a MySQL server over the SSH port and execute statements? I think I am just stuck on the connect part. executing the statements I can build up on a variable and batch execute.</p>
  <p>I have an SSH pub/priv keypair from my laptop to this server as well.</p>