mysql: see all open connections to a given database?

后端 未结 8 2001
感动是毒
感动是毒 2020-12-04 05:57

With administrative permissions im mysql, how can I see all the open connections to a specific db in my server?

相关标签:
8条回答
  • 2020-12-04 06:48

    You can invoke MySQL show status command

    show status like 'Conn%';

    For more info read Show open database connections

    0 讨论(0)
  • 2020-12-04 06:57

    As well you can use:

    mysql> show status like '%onn%';
    +--------------------------+-------+
    | Variable_name            | Value |
    +--------------------------+-------+
    | Aborted_connects         | 0     |
    | Connections              | 303   |
    | Max_used_connections     | 127   |
    | Ssl_client_connects      | 0     |
    | Ssl_connect_renegotiates | 0     |
    | Ssl_finished_connects    | 0     |
    | Threads_connected        | 127   |
    +--------------------------+-------+
    7 rows in set (0.01 sec)
    

    Feel free to use Mysql-server-status-variables or Too-many-connections-problem

    0 讨论(0)
提交回复
热议问题