开发者

Change max_connect_errors in MySQL

开发者 https://www.devze.com 2023-01-30 21:07 出处:网络
I n开发者_运维问答eed 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?

I n开发者_运维问答eed 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!


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


It seems Amazon now allows changing this parameter.

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


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


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.


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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消