怎么查询mysql的最大连接数

 2022-07-18    630  

怎么查询mysql的最大连接数

查询命令为:

怎么查询mysql的最大连接数

show variables like '%max_connections%';

MySQL 默认的最大连接数为 100,可以在 mysql 客户端使用上述命令查看

此命令将得到类似以下的输出结果:

+----------------------+-------+
| Variable_name | Value |
+----------------------+-------+
| max_connections | 1000 |
| max_user_connections | 1000 |
+----------------------+-------+

要对 mysql 的最大连接数进行修改,只需要在 my.cnf 配置文件里面修改 max_connections 的值,然后重启 mysql 就行。如果 my.ini 文件中没有找到 max_connections 条目,可自行添加以下条目

max-connections = 1000
max_user_connections = 1000

重启Mysql即可!


  •  标签:  
  • mysql
  •  

原文链接:https://77isp.com/post/2098.html

=========================================

https://77isp.com/ 为 “云服务器技术网” 唯一官方服务平台,请勿相信其他任何渠道。