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
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.
One Response to How to check the number of MySQL connections on Linux