mysql.rds_kill_query_id - Amazon Relational Database Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

mysql.rds_kill_query_id

Ends a query running against the MariaDB server.

Syntax

CALL mysql.rds_kill_query_id(queryID);

Parameters

queryID

Integer. The identity of the query to be ended.

Usage notes

To stop a query running against the MariaDB server, use the mysql.rds_kill_query_id procedure and pass in the ID of that query. To obtain the query ID, query the MariaDB Information schema PROCESSLIST table, as shown following:

SELECT USER, HOST, COMMAND, TIME, STATE, INFO, QUERY_ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = '<user name>';

The connection to the MariaDB server is retained.

Examples

The following example ends a query with a query ID of 230040:

call mysql.rds_kill_query_id(230040);