Connect to mysql
mysql -uusername -p -hhostname
show full processlist:
mysql> show full processlist;
+---------+--------+-------------------+---------+---------+------+-------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+---------+--------+-------------------+---------+---------+------+-------+------------------+
| 9255451 | logreg | dmin001.ops:37651 | logdata | Query | 0 | NULL | show processlist |
+---------+--------+-------------------+---------+---------+------+-------+------------------+
Kill the specific query. Here id=9255451
mysql> kill 9255451;
If you get permission denied, try this SQL:
CALL mysql.rds_kill(9255451)