You can execute the
SHOW PROCESSLIST statement to view the running processes.
INFORMATION_SCHEMA PROCESSLISTstatement to view the running processes.
SHOW [FULL] PROCESSLIST
The following response parameters are returned after you execute the
SHOW FULL PROCESSLIST or
SHOW PROCESSLIST statement:
- Id: the ID of the process.
- ProcessId: the unique ID of the task. This parameter is required when you execute the
- User: the current account.
- Host: the hostname of the client that sends the SHOW PROCESSLIST statement. The hostname consists of the IP address and port number of the client.
- DB: the database to which the process is connected.
- Command: the statement that is executed in the current connection. The statement types include sleep, query, and connect.
- Time: the time when the statement is executed. Unit: seconds.
- State: the execution status of the SQL statement in the current connection.
- Info: the SQL statement.
Note If you do not specify the
FULLkeyword, you can view only the first 100 characters of the Info field in each record.
- You can execute the
SHOW PROCESSLISTstatement to view the processes running under your account.
- A privileged account of a cluster can grant the PROCESS permission to a standard account by using the GRANT statement. The standard account can then view the running processes of all accounts in the cluster.
GRANT process on *.* to account_name;