gpt4 book ai didi

mysql - 如何增加 Windows Server 上 MySQL 的 max_connections 值?

转载 作者:行者123 更新时间:2023-11-29 18:31:03 25 4
gpt4 key购买 nike

我有一个问题

SQLSTATE[08004] [1040] Too many connections

在 Windows Server 2008 r2 上。现在我尝试增​​加 max_connections(默认值为 151)。在 MySQL 5.6 根文件夹 D:\...\MySQL5.6 中,我找到了一个文件 my-default.ini 并添加了

最大连接数 = 200

[mysqld]下。然后我重新启动了服务:

Service-Manager-MySQL

但什么都没有改变:

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如图所示,如何找出 Windows 上的 MySQL 服务使用的是哪一个:

  1. [开始] -> 运行... -> "services.msc"
  2. 右键单击 MySQL服务条目-> 属性
  3. [tab]常规:

MySQL-service-properties

我更新了正确的 my.ini 并重新启动了服务。现在正在使用新值。

关于mysql - 如何增加 Windows Server 上 MySQL 的 max_connections 值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45691142/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com