MySql 批量KILL耗时的连接

一、批量KILL

  查询需要处理的连接,拼接kill语句

  SELECT concat('KILL ',id,';') from information_schema.`PROCESSLIST` WHERE Time > 1000 AND USER = 'zy' ORDER BY TIME desc;  

 

 

 

 

   

posted @ 2021-01-14 11:03  姜饼攻城狮  阅读(149)  评论(0)    收藏  举报