mysql查看当前实时连接数

1. 静态查看

    SHOW PROCESSLIST;  
    SHOW FULL PROCESSLIST;  
    SHOW VARIABLES LIKE '%max_connections%';  
    SHOW STATUS LIKE '%Connection%';  

2. 实时查看

show status like 'Threads%'; 

说明

Thread_cached:The number of threads in the thread cache

Thread_connected:The number of currently open connections.

Thread_created:The number of threads created to handle connections.

Thread_running:The number of threads that are not sleeping.

show variables like '%max_connections%'; 

max_connections // 数据库设置最大连接数

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章