This article is half-done without your Comment! *** Please share your thoughts via Comment ***
In this post, I am sharing different ways to show the currently running processes and sessions in MySQL.
Also, I am sharing a command for killing any running or sleep process.
When DBA is monitoring the database, it requires to find and kill some unwanted processes of MySQL Server.
How to find running processes or sessions?
Below are three different ways:
1 2 3 |
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND != 'Sleep'; |
1 |
show processlist; |
1 2 |
/*Execute using MySQL Console*/ mysqladmin -u root -p -i 1 processlist; |
How to kill running processes or sessions?
1 |
KILL CONNECTION |