MySQL - SHOW PROCESSLIST Statement
The MySQL SHOW PROCESSLIST Statement displays information about the processes that are currently running in the server. If you execute this statement with process privilege you can get the information about the processes that are running on other users.
This statement provides following information −
Id − Connection ID.
User − Name of the MySQL user from which the process is executed.
Host − Name of the host from which the process is executed.
Db − Name of the database.
Command − Type of the command.
Time − Time representing for how long the process is in its current state.
State − Action, Event or state.
Info − The statement that the process is executing.
Example
Following query lists out the processes currently running in the MySQL server −
SHOW FULL PROCESSLIST\G;
Output
Following is the output of the above query −
************ 1. row ************
Id: 5
User: event_scheduler
Host: localhost
db: NULL
Command: Daemon
Time: 57463
State: Waiting for next activation
Info: NULL
************ 2. row ************
Id: 15
User: root
Host: localhost:50248
db: demo
Command: Query
Time: 0
State: init
Info: SHOW FULL PROCESSLIST
2 rows in set (0.00 sec)