The MySQL database hangs, due to some queries.
How can I find the processes and kill them?
Here is the solution:
SHOW FULL PROCESSLIST; to get the process id with status and query itself which causes the database hanging;KILL <pid>; to kill that process.Sometimes it is not enough to kill each process manually. So, for that we've to go with some trick:
SELECT CONCAT('KILL ',id,';') FROM information_schema.PROCESSLIST WHERE User='user'; to print all processes with KILL command;| sign, copy and paste all again into the query console. HIT ENTER. BooM it's done.