设置mysql wait_timeout过大影响如何

这样假如程序写的不够完善会出现大量sleep超过几千的进程,这样会引起性能变差,链接中断, 所以建议如下修改. 全局和会话变量一起改 具体多少变量自己决定。 ``` show VARIABLES like '%timeout%' ; set wait_timeout=600; set interactive_timeout=600; set global wait_time...

继续阅读 »

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...

继续阅读 »