— 查看进程
show PROCESSLIST
–kill 单个进程
kill ${id}
kill 1827021
— 批量kill进程
select CONCAT(‘KILL ‘,id,’;’) FROM information_schema.`PROCESSLIST` where db = ‘db_name’;
或
SELECT CONCAT(‘KILL ‘,id,’;’) AS command
FROM information_schema.processlist
WHERE `db`=’db_name’
原创文章,作者:jamestackk,如若转载,请注明出处:https://blog.ytso.com/244907.html