title: Node.js application crashes with mysql
body: <p>I am using node.js for an application, I'm also using mysql to allow users to connect on the app.</p>
  
  <p>I was using the application on local, and it was working pretty well, no crash, nothing bad.</p>
  
  <p>Today I tried to put the js server on my dedicate server and the client on my web server.</p>
  
  <p>Now that it is uploaded, I try to launch the server, but it crashes after a few seconds with these tracebacks :</p>
  
  <pre><code>events.js:48
  
      throw arguments[1]; // Unhandled 'error' event
  
  Error: Connection lost: The server closed the connection.
      at Protocol.end (/root/node_modules/mysql/lib/protocol/Protocol.js:73:13)
      at Socket.onend (stream.js:80:10)
      at Socket.emit (events.js:88:20)
      at TCP.onread (net.js:388:51)
  </code></pre>
  
  <p>The connection code is simple :</p>
  
  <pre><code>var mysql = require('mysql');
  var connection = mysql.createConnection({
      host : 'hostname',
      user : 'username',
      password : 'password',
      database : 'database',
  });
  connection.connect();
  </code></pre>
  
  <p>I tried to add a column into my db just after the connection and it works fine, my database which is on a different server than the js server accepts the connection and adds the column.</p>
  
  <p>I don't know why I don't have these errors while I'm working on local...</p>