Created
October 19, 2020 13:52
-
-
Save mgttt/1b8e9678bcc0a7181bb5309eee3717ca to your computer and use it in GitHub Desktop.
mysql kill sleep
This file contains 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 @to_kill_proc_list:=GROUP_CONCAT(CONCAT('KILL ',ID) SEPARATOR ';') q FROM information_schema.processlist WHERE Command='Sleep' and Time>5;PREPARE stmt FROM @to_kill_proc_list;EXECUTE stmt;DEALLOCATE PREPARE stmt; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment