Documentation Home
MySQL 8.4 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 39.8Mb
PDF (A4) - 39.9Mb
Man Pages (TGZ) - 257.9Kb
Man Pages (Zip) - 364.9Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb


MySQL 8.4 Reference Manual  /  Optimization  /  Examining Server Thread (Process) Information

10.14 检查服务器线程(进程)信息

为了了解 MySQL 服务器当前正在执行的操作,可以检查进程列表,这个列表显示了服务器中当前正在执行的线程。例如:

Press CTRL+C to copy
mysql> SHOW PROCESSLIST\G *************************** 1. row *************************** Id: 5 User: event_scheduler Host: localhost db: NULL Command: Daemon Time: 2756681 State: Waiting on empty queue Info: NULL *************************** 2. row *************************** Id: 20 User: me Host: localhost:52943 db: test Command: Query Time: 0 State: starting Info: SHOW PROCESSLIST

线程可以使用 KILL 语句杀死。请参阅Section 15.7.8.4, “KILL 语句”