Difference between revisions of "How to kill queries with mysql"

From Kolmisoft Wiki
Jump to navigationJump to search
(Created page with 'Instruction below describes how to easily kill unwanted queries with mysql. 1. Log in to your server over SSH. <br><br> 2. Log in to Mysql <br><br> 3. Use this query to show yo…')
 
 
(One intermediate revision by the same user not shown)
Line 4: Line 4:
1. Log in to your server over SSH.
1. Log in to your server over SSH.
<br><br>
<br><br>
2. Log in to Mysql
2. Log in to Mysql:
<br><br>
  mysql
or
  mysql -u root -pkolmisoft
3. Use this query to show you the full process list:
3. Use this query to show you the full process list:
   SHOW FULL PROCESSLIST;
   SHOW FULL PROCESSLIST;
Line 18: Line 20:
In our example it would look like:
In our example it would look like:


Kill 314102; or Kill 314155;
'''Kill 314102;''' or '''Kill 314155;'''


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


   Query OK
   Query OK

Latest revision as of 09:59, 21 May 2018

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