Menu
Amazon Relational Database Service
User Guide (API Version 2014-10-31)

mysql.rds_kill_query_id

Terminates a query running against the MariaDB server.

Syntax

Copy
CALL mysql.rds_kill_query_id(queryID);

Parameters

queryID

Integer. The identity of the query to be terminated.

Usage Notes

To terminate 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:

Copy
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.

Related Topics

Examples

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

Copy
call mysql.rds_kill_query_id(230040);