开发者

How to close existing connection in MySQL

开发者 https://www.devze.com 2023-04-04 23:53 出处:网络
I found that some connection got unclosed after the execution of command from Mysql server. How can I configure my Mysql serv开发者_如何学编程er so that I can close them all after executing a command

I found that some connection got unclosed after the execution of command from Mysql server.

How can I configure my Mysql serv开发者_如何学编程er so that I can close them all after executing a command?


if you can get the process_id inside mysql you can kill the process. Killing any process should work (though it will create a new connection next time you send a command).

mysql> SHOW PROCESSLIST; -- or SHOW FULL PROCESSLIST
mysql> KILL process_number;


Configure the wait_timeout variable to something soon enough, for example 30 seconds

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号