Manage sessions
You can manage sessions using the default stored procedures provided by KakaoCloud MySQL.
Force terminate session
Stored procedure to forcefully terminate sessions other than the currently executing local session in the MySQL DB engine.
Procedure name
mysql.mnms_kill
Procedure parameters
| Name | Data type | Description |
|---|---|---|
| p_value | INT | Session ID value |
How to use
CALL mysql.mnms_kill(109);
Example
-
Force terminate another session: check and terminate target session ID

-
Result after session termination
cautionForcefully terminating a session during transaction execution may cause data consistency issues.
Sessions for system accounts cannot be terminated.
Force terminate query
Stored procedure to forcefully terminate a query running in a session other than the currently executing local session in the MySQL DB engine.
Procedure name
mysql.mnms_kill_query
Procedure parameters
| Name | Data type | Description |
|---|---|---|
| p_value | INT | Session ID value |
How to use
CALL mysql.mnms_kill_query(109);
Example
Force terminate another query: check and terminate target session ID

Forcefully terminating a session during transaction execution may cause data consistency issues.
Queries executed by system accounts cannot be terminated.