HostOnNet Blog

How to check the number of MySQL connections on Linux

Looking for Linux Server Admin or WordPress Expert? We can help.

To count the current MySQL connections of a MySQL server, use this Linux command line trick.

Assuming that you are already logged in as root on the Linux host where the MySQL server is running, use below command to find out the number of MySQL connections:

netstat -antp | grep :3306 | wc -l

mysql_connections

NOTE: I hope your MySQL server is running on a default MySQL port (3306). If the MySQL server is using a non-standard port, replace 3306 with the port number.

About Vineesh Mohan

A Technical Support specialist with strong customer service and good communication skills. I live in the city of Cochin, which known as the Queen of Arabian Sea.
Posted in Linux, MySQL, Ubuntu

One Response to How to check the number of MySQL connections on Linux

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.