当前位置:Gxlcms > 数据库问题 > MySQL 杀死指定用户的全部进程

MySQL 杀死指定用户的全部进程

时间:2021-07-01 10:21:17 帮助过:2人阅读

+------------------------+  

| concat(‘KILL ‘,id,‘;‘) |  

+------------------------+  

| KILL 3101;             |  

| KILL 2946;             |  

+------------------------+ 

 2 rows in set (0.00 sec)  


mysql>select concat(‘KILL ‘,id,‘;‘) from information_schema.processlist where user=‘mysql_lama‘ into outfile ‘/tmp/aa7.txt‘;  


select concat(‘KILL ‘,id,‘;‘) from information_schema.processlist where info is not null and user<>‘root‘ and user<>‘system user‘ and time>1  into outfile ‘/tmp/a132.txt‘;   


mysql>source /tmp/a.txt;  


本文出自 “云淡风轻” 博客,谢绝转载!

MySQL 杀死指定用户的全部进程

标签:mysql

人气教程排行