Tuesday 11 March 2014

How to check the number of current MYSQL connections ?

Following are the different ways to check the MYSQL Connections to the database:
The below command will show the full stat about the mysql connections :
mysql> SHOW FULL PROCESSLIST\G

To get the number of connection attempts (successful or not) to the MySQL server :
mysql> show processlist;

Following command will show the number of open connections :
mysql> SHOW STATUS WHERE variable_name = 'Threads_connected';

To find current conection status you can use the following command :
#mysqladmin extended-status | grep -wi 'threads_connected\|threads_running' | awk '{ print $2,$4}' 
 
This will show you:
Threads_connected 12
Threads_running 1

No comments:

Post a Comment

ERR_CONTENT_DECODING_FAILED

If you are getting the error as ERR_CONTENT_DECODING_FAILED while accessing the domain then add the below extension in php.ini  ++++++++...