Created
March 6, 2014 15:27
-
-
Save caseyw/9392128 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To terminate user sessions or queries on DB instances, Amazon RDS provides the following commands: | |
PROMPT> CALL mysql.rds_kill(thread-ID) | |
PROMPT> CALL mysql.rds_kill_query(thread-ID) | |
For example, to kill the session that is running on thread 99, you would type the following: | |
PROMPT> CALL mysql.rds_kill(99); | |
To kill the query that is running on thread 99, you would type the following: | |
PROMPT> CALL mysql.rds_kill_query(99); |
Very useful, Thank you!
Also, we may get output of commands running it:
select concat('CALL mysql.rds_kill( ',id,');') from information_schema.processlist where user='USER_NAME' and DB='DB_NAME';
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
THANK YOU!