1、显示所有进程
mysql> show full processlist;
+-----+------+-----------+------+---------+------+-------+-----------------------+
| Id | User | Host | db | Command | Time | State | Info
+-----+------+-----------+------+---------+------+-------+-----------------------+
| 629 | root | localhost | NULL | Query | 0 | NULL | show full processlist |
| 633 | root | localhost | NULL | Sleep | 11 | | NULL |
+-----+------+-----------+------+---------+------+-------+-----------------------+
2 rows in set (0.00 sec)
2、如果正在运行的语句太多,运行时间太长,表示MySQL效率有问题。必要的时候可以将对应的进程kill掉。
mysql> kill 633;
Query OK, 0 rows affected (0.00 sec)
网友评论