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  追太阳的小码妹  阅读(136)  评论(0编辑  收藏  举报