Sample Header Ad - 728x90

Getting current number of connections in mysql

0 votes
2 answers
12651 views
I want to know if there is any parameter to show the current number of mysql connections (or peak value in the past 10 minutes or something else). Right now, I only see max and max_used connections. mysql> show global status like '%connection%'; +-----------------------------------+---------------------+ | Variable_name | Value | +-----------------------------------+---------------------+ | Connection_errors_accept | 0 | | Connection_errors_internal | 0 | | Connection_errors_max_connections | 434 | | Connection_errors_peer_address | 0 | | Connection_errors_select | 0 | | Connection_errors_tcpwrap | 0 | | Connections | 2380515 | | Max_used_connections | 152 | | Max_used_connections_time | 2020-07-09 19:28:43 | +-----------------------------------+---------------------+ 9 rows in set (0.00 sec) mysql> show global variables like '%connection%'; +--------------------------+-------------------+ | Variable_name | Value | +--------------------------+-------------------+ | character_set_connection | latin1 | | collation_connection | latin1_swedish_ci | | max_connections | 300 | | max_user_connections | 0 | +--------------------------+-------------------+
Asked by mahmood (113 rep)
Jul 12, 2020, 07:46 AM
Last activity: Aug 10, 2025, 12:04 PM