MySql 批量KILL耗时的连接
一、批量KILL
查询需要处理的连接,拼接kill语句
SELECT concat('KILL ',id,';') from information_schema.`PROCESSLIST` WHERE Time > 1000 AND USER = 'zy' ORDER BY TIME desc;
一、批量KILL
查询需要处理的连接,拼接kill语句
SELECT concat('KILL ',id,';') from information_schema.`PROCESSLIST` WHERE Time > 1000 AND USER = 'zy' ORDER BY TIME desc;