Mysql查看当前连接数 1 查看当前连接数2 查看连接到数据库的客户端ip及各连接数3 查看连接到数据库的账号、客户端ip及各连接数4 查看最大连接数5 如果要修改最大连接数为500
SHOW STATUS LIKE 'Threads%';
Threads_connected显示的数值就是当前的连接数
SELECT substring_index(host, ':',1) AS host_name,state,count(*) FROM infORMation_schema.processlist GROUP BY state,host_name;
SELECT user,substring_index(host, ':',1) AS host_name,state,count(*) FROM information_schema.processlist GROUP BY state,host_name;
SHOW VARIABLES LIKE '%max_connections%';
set global max_connections=500;
也可以修改mysql配置文件max_connections=500,然后重启mysql生效
如有错误欢迎指正
来源地址:https://blog.csdn.net/jj89929665/article/details/127847646
--结束END--
本文标题: mysql查看当前连接数
本文链接: https://www.lsjlt.com/news/440866.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-10-23
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0