var mysql = require('mysql');
var mysqlPool = mysql.createPool({
host : 'localhost',
user : 'nodejs',
password: '',
database: 'nodejs'
});
// somewhere inside a method:
mysqlPool.getConnection(function(err, connection) {
// do some queries
connection.release();
});
I don't see any warnings in the output, but on the MySQL server I see aborted connections since testing with this node.js code.
Do I have to close the connection pool when I stop the node.js app?
If yes, how?