查看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);

猜你喜欢

转载自www.cnblogs.com/liang545621/p/9400086.html