Show processList and show full processList
If blocked, kill id;
The output of the processList command shows which threads are running, not only to see all the current connection counts, but also to see the current connection status to help identify problematic queries, and so on.
If you are the root account, you can view the current connections of all users. For other common accounts, only the connections occupied by the account can be viewed. Showprocesslist lists only 100 current entries. To list them all, use the SHOW FULL PROCESSLIST command
Meaning of each column:
Connection_id () is used to query the “connection_id” assigned to the user when the user logs in to mysql. If not root, this command will only display the SQL statement ③. Host column, which shows the statement from which IP port, which can be used to trace the user ④. Db column, which shows the database ⑤. The state column displays the status of the SQL statement using the current connection, and is important. State describes a state in the execution of a statement. A SQL statement, such as queries, may need to go through states such as copying to TMP tables, sorting result, sending data, etc., to complete the ⑧. Info column, displaying the SQL statement is an important basis for determining problem statements
In a master-slave replication environment, show ProcessList or show Full ProcessList are useful for determining status, such as the state column below: