Количество подключений БД

Может ли кто-нибудь знать, как получить номер используемого DB-соединения, в MYSQL 5.0

Ответ 1

SHOW STATUS WHERE variable_name = 'Threads_connected'

Ответ 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     |
   +-------------------+-------+