SHOW PROCESSLIST
Display the running threads of the user. It should be noted that except the root user who can see all running threads, other users can only see their own running threads, and cannot see the running threads of other users.
Only display current connected FE‘s connection list by default, you can set session variable set show_all_fe_connection = true to show all FE’s connection.
grammar:
SHOW [FULL] PROCESSLIST
illustrate:
Common Command types are as follows:
Other types can refer to MySQL official website for explanation
View the threads running by the current user
SHOW PROCESSLIST
return
MySQL [test]> show full processlist; +------------------+------+------+-----------------+---------------------+----------+------+---------+------+-------+-----------------------------------+-----------------------+ | CurrentConnected | Id | User | Host | LoginTime | Catalog | Db | Command | Time | State | QueryId | Info | +------------------+------+------+-----------------+---------------------+----------+------+---------+------+-------+-----------------------------------+-----------------------+ | Yes | 0 | root | 127.0.0.1:34650 | 2023-09-06 12:01:02 | internal | test | Query | 0 | OK | c84e397193a54fe7-bbe9bc219318b75e | select 1 | | | 1 | root | 127.0.0.1:34776 | 2023-09-06 12:01:07 | internal | | Sleep | 29 | EOF | 886ffe2894314f50-8dd73a6ca06699e4 | show full processlist | +------------------+------+------+-----------------+---------------------+----------+------+---------+------+-------+-----------------------------------+-----------------------+
SHOW, PROCESSLIST