title: How to check if mysql database exists
body: <p>Is it possible to check if a (MySQL) database exists after having made a connection.</p>
  
  <p>I know how to check if a table exists in a DB, but I need to check if the DB exists. If not I have to call another piece of code to create it and populate it.</p>
  
  <p>I know this all sounds somewhat inelegant - this is a quick and dirty app.</p>