更改 MySQL 中的 max_connect_errors

发布于 2024-10-07 05:26:43 字数 146 浏览 0 评论 0原文

我需要更改 MySQL 上的 max_connect_errors 但我无法通过 SSH 控制服务器,您可以仅使用 mysql 查询来更改它吗?

如果没有,谁能告诉我如何在亚马逊的 RDS 服务上更改此设置?它似乎不在他们的参数选项中。

谢谢你!

I need to change max_connect_errors on MySQL but I have no SSH control into the server, can you change it just using a mysql query?

If not can anyone advise how I would change this on amazon's RDS service? It doesn't seem to be in their parameter options.

Thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

寄居者 2024-10-14 05:26:43

以下是我修复它的方法:

  1. 创建一个新的数据库参数组(使用命令行工具或控制台)
  2. 更改新参数组中的 max_connect_errors 。我的命令看起来像这样
    rds-modify-db-parameter-group -C cert-xxxxxx.pem -K pk-xxxxx.pem --db-parameter-group-name=customdb --parameters "name=max_connect_errors,value=10000,方法=立即”
    或者可以在控制台中完成。
  3. 在控制台中修改数据库以使用新参数组
  4. 重新启动 rds 实例。当它返回时,它将使用具有更高 max_connect_errors 的新参数组

Here's how I fixed it:

  1. Create a new db parameter group (using command line tools, or console)
  2. Change max_connect_errors in the new parameter group. My command looked like this
    rds-modify-db-parameter-group -C cert-xxxxxx.pem -K pk-xxxxx.pem --db-parameter-group-name=customdb --parameters "name=max_connect_errors,value=10000,method=immediate"
    or it can be done in the console.
  3. Modify your database in console to use new parameter group
  4. Restart rds instance. When it comes back it will use the new parameter group with the higher max_connect_errors
最偏执的依靠 2024-10-14 05:26:43

亚马逊似乎现在允许更改此参数。

您可能还想将 skip_name_resolve 设置为 1,除非您需要它。

It seems Amazon now allows changing this parameter.

You might also want to set skip_name_resolve to 1, unless you need it.

雪化雨蝶 2024-10-14 05:26:43

首先,您需要创建一个 RDS 参数组。这是您可以应用于 RDS 实例的设置“配置文件”。

接下来,您需要使用 RDS 命令行客户端或 API 工具对 RDS 参数组进行设置修改。

您还需要确保 RDS 参数组应用于您的 RDS 实例

Dave

First you need to create an RDS parameter group. This is a "profile" of settings that you can apply to your RDS instance.

Next, you need to use the RDS command line client, or API tools to make the settings modifications to your RDS parameter group.

You also need to make sure the RDS parameter group is applied to your RDS instances

Dave

紫罗兰の梦幻 2024-10-14 05:26:43

现在可以通过方便地搜索值字段在控制台中完全修改参数组。一些 AWS 文档和此类问题的许多答案都表明不再需要设置 CLI。

如前所述;您可以将 skip_name_resolve 设置为 1。这将绕过逻辑,因为它将停止执行反向 DNS 查找以解析连接的客户端的主机名。

在 AWS 中,您可以使用安全组来阻止不应访问 MySQL 服务器的系统。

The parameter groups can now be modified fully within the console with a handy search for value fields. Some of the AWS documentation and many answers out there to this kind of question point to setting up the CLI which is no longer necessary.

As mentioned earlier; you can set skip_name_resolve to 1. This will bypass the logic as it will stop performing reverse DNS lookups to resolve host names from the connected client.

In AWS you can use security groups to block systems that should not have access to the MySQL server.

绅士风度i 2024-10-14 05:26:43

对于 RDS,您必须通过编辑附加到 RDS 实例的参数组来调整参数值。

For RDS, you will have to adjust the values of the parameter by editing the parameter group attached to your RDS instance.

離人涙 2024-10-14 05:26:43
show variables like 'max_connect_errors';
/* to show current setting */

set global max_connect_errors=100000000;
/* or any number you want */

确保您以有权执行 set global 的用户身份登录

这对 amazon-rds 没有好处

show variables like 'max_connect_errors';
/* to show current setting */

set global max_connect_errors=100000000;
/* or any number you want */

make sure you login as an user have privileges to execute set global

This is no good for amazon-rds

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文