Skip to content

How to kill querys on Mysql Como killar querys no mysql

  1. Login to DB.
  2. run command show full processlist;
  3. Here you will get the process id with status and Query it self which causing the problem of hanging database.
  4. Now select the process id and run command KILL <pid>;
  5. Now that point you kill that process.

Sometime that is not enough to kill each process manually. So, for that we’ve to go with some sort of trick. here I go with that trick:

  1. Login to MySql
  2. run that query Select concat('KILL ',id,';') from information_schema.processlist where user='user';
  3. This will print all the process with KILL command.
  4. Copy all the query result, manipulate them and remove pipe | sign and paste all again into the query console. HIT ENTER. BooM its done.
Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.