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 // 數據庫設置最大連接數

 

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