码迷,mamicode.com
首页 > 数据库 > 详细

MySQL 批量杀mysql线程

时间:2015-06-15 18:12:46      阅读:173      评论:0      收藏:0      [点我收藏+]

标签:

mysql> SELECT concat(‘KILL ‘,id,‘;‘) FROM information_schema.processlist WHERE user=‘root‘;
+------------------------+
| concat(‘KILL ‘,id,‘;‘) |
+------------------------+
| KILL 21107;            |
+------------------------+
1 row in set (0.01 sec)

mysql> SELECT concat(‘KILL ‘,id,‘;‘) FROM information_schema.processlist WHERE user=‘root‘ INTO OUTFILE ‘/tmp/killid.txt‘;
Query OK, 1 row affected (0.01 sec)

mysql> source /tmp/killid.txt;

  

MySQL 批量杀mysql线程

标签:

原文地址:http://www.cnblogs.com/xiaoit/p/4578464.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!