title: Querying db using node-mysql hangs, no error
body: <p>After creating a simple connection and making sure it works (give it wrong info and it throws an error) I went ahead and tried to query but upon doing so, the server just hangs, no error.</p>
  
  <p>Here is the snippet:</p>
  
  <pre><code>var db = mysql.createConnection({
    host     : config.host,
    user     : config.user,
    password : config.password,
    port     : config.port,
    database : config.database
  });
  
  db.connect();
  
  db.query("SELECT 1", function(err, rows) {
    console.log(rows);
  });
  </code></pre>
  
  <p>Is there an error with the connection? How could I catch it if so? </p>