Get the App
SLTechnology News&Howtos  ›  Database  › 

How does AWS RDS for MySQL terminate a session

Shulou Source: shulou.com Published: 2022-05-31 16:03:34 09月15日 Update

Editor to share with you how to terminate the session of AWS RDS for MySQL, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

Mysql.rds_kill_query_id

Terminates the query that runs against the MySQL or MariaDB server.

Grammar

CALL mysql.rds_kill_query_id (queryID)

Parameters.

QueryID

Round number. The identity of the query that will be terminated.

instructions

To terminate a query running against the MariaDB server, use the mysql.rds_kill_query_id procedure and pass in the ID of the query. To get

Fetch the query ID as follows:

SELECT USER, HOST, COMMAND, TIME, STATE, INFO, QUERY_ID FROM

INFORMATION_SCHEMA.PROCESSLIST WHERE USER ='

The following example terminates a query with a query ID of 11195102:

Call mysql.rds_kill_query_id (11195102)

Statements for batch kill session:

Select concat ('CALL mysql.rds_kill ();', id,';') from information_schema.processlist where user='test'

Select concat ('CALL mysql.rds_kill (', trx_mysql_thread_id,');') from information_schema.innodb_trx

CALL mysql.rds_kill (11195230)

CALL mysql.rds_kill (11195102)

CALL mysql.rds_kill (11195114)

CALL mysql.rds_kill (11195108)

CALL mysql.rds_kill (11195179)

CALL mysql.rds_kill (11195224)

CALL mysql.rds_kill (11195214)

CALL mysql.rds_kill (11194577)

CALL mysql.rds_kill (11195476)

CALL mysql.rds_kill (11194995)

CALL mysql.rds_kill (11195187)

CALL mysql.rds_kill (11195022)

CALL mysql.rds_kill (11195319)

The above is all the contents of the article "how to terminate a session with AWS RDS for MySQL". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Queries articles content servers services runs not much usage instructions parameters most integers more identities knowledge examples industries statements syntax information information channels Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker MariaDB Microsoft vpn Shulou Technology