Show running processes in MySQL
The KILL command terminates a connection thread by ID along with the related active query, if there is one. Then, to identify queries for deletion, you need to see processes on the server - and the SHOW PROCESSLIST command will be a fine solution. It's not an elegant way to fix database issues, but rather an effective last resort tool. There are 4 major reasons for that:
- If a long-running query holds other transactions from executing your more relevant query
- If a large number of faulty queries block viable queries
- If there are orphan processes after a client was disconnected from a server
- 'Too many connections' message