Created
February 11, 2016 10:25
-
-
Save ffeast/620da5515ed4a8c8b2e6 to your computer and use it in GitHub Desktop.
Mysql kill 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
/* run \. /tmp/mysql_victims.txt after executing this query */ | |
SELECT | |
concat('KILL ', id, ';') | |
FROM | |
information_schema.processlist | |
WHERE | |
user='victim' AND time > 60 | |
INTO OUTFILE '/tmp/mysql_victims.txt'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment