jrhdpt02:/root# mysql -uroot -p'x' -e "show processlist" | grep query | grep local
Warning: Using a password on the command line interface can be insecure.
177550 query_all localhost NULL Sleep 55 NULL
jrhdpt02:/root# mysql -uroot -p'x' -e "show processlist" | grep query | grep local
Warning: Using a password on the command line interface can be insecure.
177550 query_all localhost NULL Sleep 70 NULL
177556 query_all localhost NULL Sleep 2 NULL
mysql> show databases;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 177575
Current database: *** NONE ***mysql kill thread
最新推荐文章于 2024-12-12 16:08:45 发布
本文展示了如何通过MySQL命令行工具检查并终止特定的查询线程。通过`show processlist`命令找出正在Sleep状态的查询,并使用kill命令结束它们。
1351

被折叠的 条评论
为什么被折叠?



