node-mysql2
node-mysql2 copied to clipboard
run query after each connections in pool conected
hi i need run a query after each connections in pool conected some option like MYSQL_ATTR_INIT_COMMAND in php PDO please help me
Are you talking about idleConnectionTimeout ?
probably not implemented yet, need to double check
quick searching shows 2 PRs, need to check if they are still viable
- https://github.com/sidorares/node-mysql2/pull/736
- https://github.com/sidorares/node-mysql2/pull/321
on dear i want to run some query after ech connections connected i found this :
pool.on('connection', function(conn) {
is it ok?