Skip to main content

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​

NameData typeDescription
p_valueINT    Session ID value

How to use​

CALL mysql.mnms_kill(109);

Example​

  1. Force terminate another session: check and terminate target session ID

    Image

  2. Result after session termination

    Image

    Session force termination caution

    Forcefully 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​

NameData typeDescription
p_valueINT    Session ID value

How to use​

CALL mysql.mnms_kill_query(109);

Example​

Force terminate another query: check and terminate target session ID

Image

Query force termination caution

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