Skip to content

Instantly share code, notes, and snippets.

@ffeast
Created February 11, 2016 10:25
Show Gist options
  • Save ffeast/620da5515ed4a8c8b2e6 to your computer and use it in GitHub Desktop.
Save ffeast/620da5515ed4a8c8b2e6 to your computer and use it in GitHub Desktop.
Mysql kill queries
/* 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