ScaleArc Support Center

Welcome back, guest

Register or login below.

Downloads

Feedback

How to kill all the connection in SLEEP on MySQL Database.

Release Classification Level DB Platform Categories
All How To MySQL Connection Management

 

OBJECTIVE

How to kill all the connection in SLEEP on MySQL Database.

 

PROCEDURE

In case the SLEEP connection on MySQL DB is too large and are not cleared automatically, we can kill the connection explicitely on the database using the following command:

 

mysql -u<Username> -p<password> -e "show processlist;" | grep Sleep | awk '{print $1}' | while read LINE; do mysql -u<Username> -p<password> -e "kill $LINE"; done 

 


If you are experiencing issues with ScaleArc or with any of it's features, please contact ScaleArc Support. We are available 24x7 by phone at 855 800 7225 or +1 408 412 7315. For general support inquiries, you can also e-mail us at support@scalearc.com.

Copyright ©2014 ScaleArc, Inc. All rights reserved. Contact Support |  Contact ScaleArc |  Feedback

2901 Tasman Drive Santa Clara, CA 95054 | Email:  support@scalearc.com

Permalink: https://support.scalearc.com/kb/articles/4159