Session Management
You can manage sessions using the built-in stored procedures provided by KakaoCloud MySQL.
Force session termination procedure
This stored procedure is used to forcibly terminate sessions, excluding the one currently connected to the MySQL DB engine.
Procedure name
mysql.mnms_kill
Procedure parameters
Name | Data Type | Description |
---|---|---|
p_value | INT | The session ID to be terminated. |
How to use
CALL mysql.mnms_kill(109);
Example
-
Example of forcibly terminating another session by checking the session ID.
-
Result after session termination
Forcibly terminating a session that is in the middle of a transaction may result in data consistency issues.
System accounts cannot be forcibly terminated.
Force query termination procedure
This stored procedure is used to forcibly terminate queries in sessions other than the one currently connected to the MySQL DB engine.
Procedure name
mysql.mnms_kill_query
Procedure parameters
Name | Data Type | Description |
---|---|---|
p_value | INT | The session ID of the query to be terminated. |
How to use
CALL mysql.mnms_kill_query(109);
Example
-
ㅜ파Example of forcibly terminating a query in another session by checking the session ID.
Forcibly terminating a session that is in the middle of a transaction may result in data consistency issues.
Queries executed by system accounts cannot be forcibly terminated.