如何在Windows Server上增加MySQL的max_connections值?
问题描述:
我有一个Windows Server 2008 R2上如何在Windows Server上增加MySQL的max_connections值?
SQLSTATE[08004] [1040] Too many connections
的问题。现在我试图增加max_connections
(默认值是151
)。在MySQL的5.6
根文件夹D:\...\MySQL5.6
我发现了一个文件my-default.ini
和[mysqld]
下加入
MAX_CONNECTIONS = 200
。然后我重新启动该服务:
但一切都没有改变:
SHOW VARIABLES LIKE "max_connections";
+-----------------+-------+
¦ Variable_name ¦ Value ¦
+-----------------+-------+
¦ max_connections ¦ 151 ¦
+-----------------+-------+
我改名为my-default.ini
到my.ini
,并再次重新启动MySQL服务器。没有效果。
如何在Windows Server上永久设置MySQL max_connections
?
答
我的不好 - 我编辑了错误的my.ini
。
在这种video显示,如何找出,其中之一是使用MySQL服务在Windows上:
-
[Start]
->
Run...
->
“SERVICES.MSC” -
right click
上的条目MySQL服务->
Properties
-
[tab] General
:
我更新了正确的my.ini
并重新启动了服务。现在正在使用新的价值。