1,统计数据库连接数,以ip作为分组 select SUBSTRING_INDEX(host,':',1) as ip , count(*) from information_schema.processlist group by ip;结果