Query is locking tables, can't kill that process

送分小仙女□ 提交于 2019-12-05 11:59:58

When you run a MySQL instance on RDS and want to kill a thread or a query for some reason, you’ll find you cannot use KILL or mysqladmin kill because you don’t have a permission to do so.

RDS provides the stored procedures named mysql.rds_kill and mysql.rds_kill_query which will kill a thread and a query respectively. To kill a thread, first use SHOW PROCESSLIST to get the list of threads and find the id of the thread you want to kill. Assuming the thread id is 53512, then use

CALL mysql.rds_kill(53512)

Source: http://snak.tumblr.com/post/13856391340/killing-a-thread-or-query-of-mysql-running-on-rds

The KILL command requests the query terminate, and the state of the command should show up as Killed. There's no way to force-kill something and have it terminate immediately.

As a last resort you can always shut-down and restart your mysqld server process.

You need to run following command to kill the process.

> show processlist;  
> kill query processId;

Query parameter specifies that we need to kill query command process.

The syntax for kill process as follows

KILL [CONNECTION | QUERY] processlist_id

Please refer this link for more information.

you should try to kill the mysql/sql service on you computer first and than tray to kill the the program you are runnen white the query.

hope it will work for you

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!