Forked from lucashungaro/mysql - kill all sleeping connections
Created
January 10, 2019 07:12
-
-
Save aaronpearce/3422bbcf3681b0653b293bf8cb1f1c62 to your computer and use it in GitHub Desktop.
MySQL - kill command for all idle queries
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT GROUP_CONCAT('kill ',id SEPARATOR '; ') AS kill_list | |
FROM INFORMATION_SCHEMA.PROCESSLIST | |
WHERE command='Sleep'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment