Skip to content

Latest commit

 

History

History
52 lines (37 loc) · 2.36 KB

8.14-thread-information.md

File metadata and controls

52 lines (37 loc) · 2.36 KB

8.14 Examining Server Thread (Process) Information

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

To ascertain what your MySQL server is doing, it can be helpful to examine the process list, which indicates the operations currently being performed by the set of threads executing within the server. For example:

想要确定 MySQL 服务器当前在做什么,可以查看进程列表,该列表展示了在服务器内执行的线程当前所执行的操作。 例如:

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

Threads can be killed with the KILL statement. See Section 13.7.8.4, “KILL Statement”.

可以使用 KILL 语句来杀死某些线程. 详情请参考 Section 13.7.8.4, “KILL Statement”.

https://dev.mysql.com/doc/refman/8.0/en/thread-information.html