Niranjan Kulkarni
04/29/2026, 11:11 AMRocky
04/29/2026, 11:11 AMKILL ALL FOR USER, so you must identify the IDs and terminate them.
1. Identify the Processes
As an admin (with OPERATE or SYSTEM privileges), you can view all running queries across the cluster.
* Option A: Using SHOW PROCESSLIST
This lists all active connections.
sql
SHOW FULL PROCESSLIST;
Look for the Id and User columns to find the connection IDs for the target user.
* Option B: Using SHOW PROC (Recommended for v3.0+)
This provides a more detailed view of running queries.
sql
-- View queries on the current FE
SHOW PROC '/current_queries';
-- View queries across all FEs (v3.4+)
SHOW PROC '/global_current_queries';
This will return a ConnectionId and the User who submitted the query.
2. Terminate the Processes
Once you have the IDs, use the KILL command:
* To terminate a specific query (leaves the connection open):
sql
KILL QUERY <connection_id>;
* To terminate the connection entirely (closes the session):
sql
KILL CONNECTION <connection_id>;
-- OR simply
KILL <connection_id>;
3. Bulk Cancel (Automation)
If the user has many running processes, you can generate the kill commands using a shell pipeline from your terminal:
bash
# Replace <target_user>, <fe_ip>, and <port> with your actual values
mysql -h <fe_ip> -P <port> -u admin -p -e "SHOW PROCESSLIST" | \
grep "<target_user>" | \
awk '{print "KILL " $1 ";"}' | \
mysql -h <fe_ip> -P <port> -u admin -p
Summary of Commands
Command | Description
SHOW PROCESSLIST | Lists active connections and their IDs.
SHOW PROC '/global_current_queries' | Lists all running queries cluster-wide.
KILL <id> | Terminates the connection/query for the given ID.
KILL ANALYZE <id> | Specifically cancels a running statistics collection task.
Note: Regular users can only kill their own queries. As an admin, you can kill processes initiated by any user.
References
• sql-reference/sql-statements/cluster-management/nodes_processes/SHOW_PROCESSLIST.md
• using_starrocks/running_queries.md
• sql-reference/sql-statements/cluster-management/nodes_processes/SHOW_PROC.md