title: Socket.io and MySQL Connections
body: <p>I'm working on my first node.js-socket.io project. Until now i coded only in PHP. In PHP it is common to close the mysql connection, when it is not needed any more.
  My Question: Does it make sense to keep just one mysql-connection during server is running open, or should i handle this like PHP. 
  Info: In the happy hours i will have about 5 requests/seconds from socket clients and for almost all of them i have to make a mysql_crud.</p>
  
  <p>Which one would you prefer?</p>
  
  <pre><code>io = require('socket.io').listen(3000); var mysql = require('mysql');
  var connection = mysql.createConnection({
      host:'localhost',user:'root',password :'pass',database :'myDB'
  });
  
  connection.connect();  // and never 'end' or 'destroy'
  // ...
  </code></pre>
  
  <p>or</p>
  
  <pre><code>var app = {};
  app.set_geolocation = function(driver_id, driver_location) {
      connection.connect(); 
      connection.query('UPDATE drivers set ....', function (err) {
          /* do something  */
      })
      connection.end();
  }
  ...
  </code></pre>