1. 查看mysql设置的最大连接数,默认是100
show variables LIKE '%max_connections%';
2. 查询所有连接到mysql的客户端IP
SELECT substring_index(host, ':',1) AS host_name,state,count(*) FROM information_schema.processlist GROUP BY state,host_name;
3 . 查看数据库所有客户端执行时间,以及状态
show full processlist;