依条件删除mysql processlist

1 有时mysql show full processlist 中有大量程序要删除

 

2  process结构,存储在information_schema的processlist表中

 

3 处理

select concat('KILL ',id,';') from information_schema.processlist where State like 'Waiting for table' into outfile '/tmp/a5.txt';

source /tmp/a5.txt;

posted @ 2016-10-13 10:31  庚午大侠  阅读(1536)  评论(0编辑  收藏  举报