MySQL 網絡訪問連接
阿新 • • 發佈:2017-07-18
spa epm dex subst rm2 count slist eight 訪問
分主機查看連接數
mysql> select count(1) ‘連接數‘,host_db.host ‘客戶端‘ from ( select substring_index(host,‘:‘,1) as "host" from processlist ) host_db group by host_db.host; +------+---------------+ | 連接數 | 客戶端 | +------+---------------+ | 3 | 172.16.91.237 | | 3 | 172.16.91.249 | | 186 | bogon || 12 | localhost | +------+---------------+ 4 rows in set
分數據庫查看連接數
mysql> select count(1) ‘連接數‘,db ‘數據庫‘ from processlist group by db; +------+--------------------+ | 連接數 | 數據庫 | +------+--------------------+ | 1 | NULL | | 3 | bpm | | 3| bpm_ys | | 3 | epm | | 2 | information_schema | | 119 | perform2 | | 5 | pms | | 39 | portal | | 29 | security_ys | +------+--------------------+ 9 rows in set
MySQL 網絡訪問連接