Answers for "mysql stop via kill"

SQL
1

mysql kill

mysql> SELECT GROUP_CONCAT(CONCAT('KILL ',id,';') SEPARATOR ' ') 
 
FROM information_schema.processlist WHERE user <> 'system user';
Posted by: Guest on January-29-2021
0

mysql kill

-- 查询执行时间超过2分钟的线程,然后拼接成 kill 语句
select concat('kill ', id, ';')
from information_schema.processlist
where command != 'Sleep'
and time > 2*60
order by time desc
Posted by: Guest on December-02-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language