当前位置:Gxlcms > 数据库问题 > MySQL查看和修改最大连接数

MySQL查看和修改最大连接数

时间:2021-07-01 10:21:17 帮助过:4人阅读

  show variables  like  ‘max_connections‘ ;

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

+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| max_connections | 2000  |
+-----------------+-------+
1 row in set (0.00 sec)

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

max_connections = 20

MySQL查看和修改最大连接数

标签:

人气教程排行