MySQL 杀死指定用户的全部进程
2015-08-13 09:40
666 查看
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='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;
本文出自 “云淡风轻” 博客,谢绝转载!
+------------------------+
| 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,int(5)、int(10)啥区别联系
- MySQL AUTO_INCREMENT
- Mysql-5.5.32 cmake安装
- 连接MySql的时候报1130的错误解决办法
- 连接MySql的时候报1130的错误解决办法
- 连接MySql的时候报1130的错误解决办法
- mysql学习笔记2
- mysql学习笔记1
- MYSQL 大小写区分说明
- mysql优化不可不做的事情
- mysql insert 主键 重复问题
- mysql中使用case when 做where条件筛选表记录
- MySQL 5.6 中 TIMESTAMP 的变化分析
- mysql JOIN要点
- 让Mysql支持Emoji表情
- mybatis 连接mysql数据库 tinyint 为boolean类型
- group by的参考地址
- 【MySql】使用记录<六>
- 安全快速更改MySQL数据库名称
- MySQL到MsSQL的迁移工具——SSMA