您的位置:首页 > 数据库 > MySQL

批量kill mysql线程和输出完整info mysql线程

2016-01-26 20:07 513 查看
具体过程如下:

mysql> SELECT concat('KILL ',id,';') FROM information_schema.processlist WHERE user='root';

+————————+

| 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='root' INTO OUTFILE '/tmp/a.txt';

Query OK, 2 rows affected (0.00 sec)

mysql> source /tmp/a.txt;

Query OK, 0 rows affected (0.00 sec)

转自:http://blog.chinaunix.net/uid-20639775-id-154587.html

输出完整mysql线程

1:show full  processlist

2:select  *  from    information_schema.processlist
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  mysql kill 线程 linux