Mysql get current connections

 

To get  current connections in mysql use any following command after logging into mysql from command line.

First login in into mysql:

$ mysql -u root -p'mySqlPassowrd'

Now enter any of following command:

To view only number of live connections:

mysql> SHOW STATUS WHERE `variable_name` = 'Threads_connected';

To view quick summery of all mysql details including live connections:

mysql> status;

To view all live connections details:

mysql> show processlist;

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s