I\'m trying to reproduce a MySQL error I\'m seeing in my node.js app on EC2 with the node mysql library:
Connection lost: The server closed the connec
Check out mysql pool feature in node-mysql
var mysql = require('mysql'); var pool = mysql.createPool({ host : 'example.org', user : 'bob', password : 'secret' }); pool.getConnection(function(err, connection) { // connected! (unless `err` is set) connection.end(); });