批量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线程
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中的integer 数据类型
- Linux socket 初步
- MySQL存储过程
- Linux Kernel 4.0 RC5 发布!
- linux lsof详解
- linux 文件权限
- Linux 执行数学运算
- 10 篇对初学者和专家都有用的 Linux 命令教程
- Linux 与 Windows 对UNICODE 的处理方式
- Ubuntu12.04下QQ完美走起啊!走起啊!有木有啊!
- 解決Linux下Android开发真机调试设备不被识别问题
- 运维入门
- 运维提升
- Linux 自检和 SystemTap
- mysql中int、bigint、smallint 和 tinyint的区别与长度
- mysql load data 导出、导入 csv
- source命令执行SQL脚本文件