If we do not close or end the mysql connection in node js, these are effects in the function or not.
I do like this
var mysql = require('mysql');
var connection = mysql.createConnection(...);
connection.query('SELECT 1', function(err, rows) {
});
I do not end the mysql connection with any where in my code. My question is: It is necessary to close the mysql connection. If we do not close the mysql connection, I will encounter any other problems in the future.
Please help me be new to nodejs
EDIT1
I will not encounter problems such as inability to connect, too many connections to open, etc. Does this mean any problems related to resources? to the right.
EDIT2
What instant mysql connection will be close if we don't finish it manually or using the end function?