Connect with MySQL database based on config, Handle any errors in connection Set the pool handlers on connection.error Also set proper timezone once connection is connected.
Called after connect, once the connection has been registered with the pool.
Override this to attach error handlers or run post-connection setup queries.
Calling pool.destroy() on the connection from here does not throw, but it does not
close the connection either: the pool only takes ownership once this method resolves.
The connection returned by connect
Determine if a connection is still valid or not
MySQL Connection Manager
Get connections, validate and disconnect them. AbstractConnectionManager pooling use it to handle MySQL specific connections Use https://github.com/sidorares/node-mysql2 to connect with MySQL server