更改 MySQL 中的 max_connect_errors
我需要更改 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
以下是我修复它的方法:
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,方法=立即”
或者可以在控制台中完成。
Here's how I fixed it:
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.
亚马逊似乎现在允许更改此参数。
您可能还想将
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.首先,您需要创建一个 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
现在可以通过方便地搜索值字段在控制台中完全修改参数组。一些 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.
对于 RDS,您必须通过编辑附加到 RDS 实例的参数组来调整参数值。
For RDS, you will have to adjust the values of the parameter by editing the parameter group attached to your RDS instance.
确保您以有权执行
set global
的用户身份登录这对 amazon-rds 没有好处
make sure you login as an user have privileges to execute
set global
This is no good for amazon-rds