Skip to main content

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

NameData TypeDescription
p_valueINT    The session ID to be terminated.

How to use

CALL mysql.mnms_kill(109);

Example

  1. Example of forcibly terminating another session by checking the session ID.

    Image

  2. Result after session termination

    Image

Caution

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

NameData TypeDescription
p_valueINT    The session ID of the query to be terminated.

How to use

CALL mysql.mnms_kill_query(109);

Example

  1. ㅜ파Example of forcibly terminating a query in another session by checking the session ID.

    Image

caution

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.