Can anyone know the way to get the number of DB connection being used , in MYSQL 5.0
Asked
Active
Viewed 1.5k times
3 Answers
3
Number of open connections can be found out by using below query:
mysql -e 'SHOW STATUS WHERE variable_name LIKE "Threads_%" OR variable_name = "Connections"'
+-------------------+-------+
| Variable_name | Value |
+-------------------+-------+
| Connections | 862 |
| Threads_cached | 0 |
| Threads_connected | 10 |
| Threads_created | 26 |
| Threads_running | 1 |
+-------------------+-------+

Appy
- 79
- 3
3
12.5.5.31. SHOW PROCESSLIST Syntax
Shows you how many people are connected to the server.
-
Actually, i need to know how many DB connections have been opened so far – May 05 '09 at 11:32
-
In That case you can use: SHOW STATUS WHERE variable_name = 'Threads_created'; And to see the maximum connections opened at any one time use SHOW STATUS WHERE variable_name = 'Max_used_connections'; – May 05 '09 at 12:37