当前位置:首页 - MySql

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

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

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: 44.220.184.63 X-Real-Ip: 44.220.184.63 X-Domain: r4.com.cn X-Request: GET /art233.aspx HTTP/1.1 X-Request-Uri: /art233.aspx Connection: close User-Agent: CCBot/2.0 (https://commoncrawl.org/faq/) Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 If-Modified-Since: Sun, 16 Jun 2024 12:51:20 GMT Accept-Encoding: br,gzip