查看MySQL数据的连接

 
show processlist;
 
select host from information_schema.processlist;
 
查看那台机器及连接数
select host, current_connections from sys.host_summary;
(sys.host_summary此视图在5.7以及之后版本才有)
 
 
select substring_index(host,":",1),count(*) as conn from information_schema.processlist group by substring_index(host,":",1);

 

posted @ 2018-08-01 11:02  屠魔的少年  阅读(404)  评论(0)    收藏  举报