Kill thread on MySQL instance

1,683 views
Skip to first unread message

Jacob See

unread,
Jan 8, 2018, 8:56:05 PM1/8/18
to Google Cloud SQL discuss
I have some developers working on a Cloud SQL MySQL instance - and one of them ran a query which seems to have gotten stuck. Do I have a way to kill that without rebooting the instance?

Taher (Cloud Platform Support)

unread,
Jan 8, 2018, 11:34:16 PM1/8/18
to google-cloud...@googlegroups.com
Hello Jacob, 

You can try the below command which might help you resolve the issue.

mysql> show processlist;
mysql
> kill "number from first col";

Shua Talansky

unread,
Feb 1, 2018, 2:43:40 PM2/1/18
to Google Cloud SQL discuss
Whenever I try to do this I get "10952 - You are not owner of thread X" Is there a way to get around this?  

Skyler Slade

unread,
Feb 2, 2018, 10:10:57 AM2/2/18
to Google Cloud SQL discuss
Since you don't get SUPER with Cloud SQL, the only way that you can kill a query is to login as the user who owns it and kill it.

We keep an (encrypted) plaintext copy of all of our user and application passwords so that we can kill a runaway query if we ever need to.

Shua Talansky

unread,
Feb 2, 2018, 3:52:57 PM2/2/18
to Google Cloud SQL discuss
Is there any RDS equivalent to the RDS method CALL mysql.rds_kill(thread-ID)
Also, can I just adjust the mysql.users table and make myself a super user?
Reply all
Reply to author
Forward
0 new messages