MYSQL 查询线程语句
按IP来排序
select client_ip,count(client_ip) as client_num from (select substring_index(host,':' ,1) as client_ip from information_schema.processlist ) as connect_info group by client_ip order by client_num desc;
显示线程数
show status like 'thread%';
显示所有线程
SHOW FULL PROCESSLIST;