How to kill queries with mysql

From Kolmisoft Wiki
Jump to navigationJump to search

Instruction below describes how to easily kill unwanted queries with mysql.


1. Log in to your server over SSH.

2. Log in to Mysql:

 mysql

or

 mysql -u root -pkolmisoft

3. Use this query to show you the full process list:

 SHOW FULL PROCESSLIST;

It will show you running queries in server. For example:
Query example.jpg
4. To kill query you should enter:

 Kill <<query_id>>;

In our example it would look like:

Kill 314102; or Kill 314155;

5. If query is killed successfully, you will see message:

 Query OK