MySQL kill 其中运行时间很长的sql
MySQL kill 其中运行时间很长的sql
使用终端navicat 或者其他mysql客户端执行:
show processlist; --显示正在运行的进程
查询结果举例如下:
Id User Host db Command Time State Info
9896217 test 192.168.0.35:42622 test Sleep 2039 NULL
9896218 test 192.168.0.35:42630 test Sleep 20 NULL
10069579 admin 192.168.30.179:62458 test Sleep 2800 NULL
10070773 admin 192.168.30.118:56748 test Sleep 10255 NULL
10071227 admin 192.168.30.179:63027 test Sleep 11497 NULL
10071240 admin 192.168.30.179:63030 test Sleep 11466 NULL
10071647 test 192.168.0.71:44252 test Sleep 123 NULL
10071703 admin 192.168.30.118:59024 NULL Sleep 15544 NULL
10071864 admin 192.168.30.179:64182 test Sleep 15376 NULL
10072364 test 192.168.0.71:44765 test Sleep 2510 NULL
10073063 admin 192.168.10.43:45596 NULL Sleep 977 NULL
10073068 admin 192.168.10.43:45598 test Sleep 709 NULL
10073069 admin 192.168.10.43:45606 test Sleep 14448 NULL
10073657 root 192.168.20.14:58354 test Query 0 starting show processlist
10073658 root 192.168.20.14:58355 NULL Sleep 42 NULL
10084620 develop 192.168.10.95:51325 NULL Sleep 5800 NULL
10087348 develop 192.168.10.95:52246 test Sleep 3660 NULL
10087365 develop 192.168.10.95:52251 test Sleep 3643 NULL
10091273 admin 192.168.10.43:53422 test Sleep 989 NULL
10091353 admin 192.168.10.43:53456 test Sleep 899 NULL
10092082 root 192.168.30.28:53422 NULL Sleep 76 NULL
10092083 root 192.168.30.28:53424 test Sleep 8 NULL
10092977 root 192.168.30.28:53702 test Sleep 2 NULL
找到对应的进程ID,即第一列ID,直接kill掉即可:
kill 10073616;
kill 10073615;
。
本文链接二维码可以保存在本地:保存
http://shixiangcun.cc/index.php?c=index&id=66&m=articleDetailInfo
分类 MySQL | 浏览 (4070) | 赞 (0) | 踩 (0) | | 2017-07-07 15:45:42 |
相关文章
- Mac上安装MySQL 并配置 my.cnf
- MySQL客户端连接报错
- MySQL数据超出字段范围会报错:Out of range value for column
- Mac下mysql服务启动失败原因小记
- Geometry byte string must be little endian.