brindha
brindha

Reputation:

Number of DB connections opened

Can anyone know the way to get the number of DB connection being used , in MYSQL 5.0

Upvotes: 12

Views: 15320

Answers (3)

Appy
Appy

Reputation: 79

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     |
   +-------------------+-------+

Upvotes: 3

user83632
user83632

Reputation:

12.5.5.31. SHOW PROCESSLIST Syntax

Shows you how many people are connected to the server.

Upvotes: 3

Quassnoi
Quassnoi

Reputation: 425843

SHOW STATUS WHERE variable_name = 'Threads_connected'

Upvotes: 24

Related Questions