MySQL Connection

 

The SHOW FULL PROCESSLIST statement shows all threads that are currently running. It is very handy to use if you get the “too many connections” error message and want to find out what is going on.

SHOW FULL PROCESSLIST;

Sometimes some connections are hanging and taking up resources that other threads might need. When you come accross this issue you can kill that thread by using the KILL command.

KILL [CONNECTION | QUERY ] process_id

KILL CONNECTION process_id or KILL process_id terminates two things in this order:
1. Terminate statement that the connection is executing
2. Terminate the connection associated with the process_id

process_id comes from the id column.

KILL QUERY process_id terminates the statement that the connection is executing but leaves the connection intact.

 




Subscribe To Our Newsletter
You will receive our latest post and tutorial.
Thank you for subscribing!

required
required


Leave a Reply

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