title: Mysql getConnection() doesn't return the callback function in nodejs
body: <p>I am trying to get a connection from mysql connection pool in nodejs. But the getConnection method for the pool does not return the callback function. (so it doesn't show any error or return the connection). But my mysql workbench shows that a connection has been made. Still when I using the connection it doesn't return anything in the callback.</p>
  
  <pre><code>   var pool = mysql.createPool({
        connectionLimit: 10,
        host: "localhost",
        database: "database",
        user: "root",
        password: "password"
     });
  
     exports.query = function (query, params, callback) {
        pool.getConnection(function (err, connection) {
          if (err) {
  
              console.log(err);
              connection.release();
              callback(err.code, null);
          }
          console.log("connected");
          connection.query(query, params, function (err, results) {
              connection.release();
              if (!err) {
                  callback(null, results);
  
              }
              else {
  
                  callback(err.code, null);
  
              }
  
          });
  
          connection.on('error', function (err) {
              connection.release();
              callback(err.code, null);
          });
  
      });           
  </code></pre>
  
  <p>}</p>
  
  <p>This is where I query using the database.</p>
  
  <pre><code> exports.getLevels= function(callback){
      var query = 'SELECT * FROM levels';
      db.query(query,null, function (err, results) {
         if (err) {
            console.log(err);
         }
         console.log('reached');
         callback(err, results);
      });
   }
  </code></pre>