Skip to content

Instantly share code, notes, and snippets.

@pichuang
Last active August 29, 2015 14:05
Show Gist options
  • Save pichuang/f49170529126cf636a54 to your computer and use it in GitHub Desktop.
Save pichuang/f49170529126cf636a54 to your computer and use it in GitHub Desktop.
KILL PROCESSLIST in MySQL
source /tmp/kill_process.txt;
select concat('KILL ',id,';') from information_schema.processlist where user='root' and time > 200 into outfile '/tmp/kill_process.txt';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment