当前位置:首页 - MySql

mysql查看设置当前最大链接数

作者:高景洋 日期:2023-05-11 15:24:09 浏览次数:937
#按用户查看链接数

select USER , count(*) from information_schema.processlist group by USER;


#查看每个host的链接数

SELECT substring_index(host, ':',1) AS host_name,state,count(*) FROM information_schema.processlist GROUP BY state,host_name;


#查看当前执行的sql

SHOW PROCESSLIST;


#查看当前最大链接数

show variables like 'max_connections';


#设置当前最大链接数
set global max_connections=1000;
本文永久性链接:
<a href="http://r4.com.cn/art233.aspx">mysql查看设置当前最大链接数</a>
当前header:Host: r4.com.cn X-Host1: r4.com.cn X-Host2: r4.com.cn X-Host3: 127.0.0.1:8080 X-Forwarded-For: 18.118.33.186 X-Real-Ip: 18.118.33.186 X-Domain: r4.com.cn X-Request: GET /art233.aspx HTTP/1.1 X-Request-Uri: /art233.aspx Connection: close Accept: */* User-Agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com) Accept-Encoding: gzip, br, zstd, deflate