Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change max_connect_errors in MySQL

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!

like image 310
kieran Avatar asked Dec 13 '10 13:12

kieran


People also ask

What is Max_connect_errors?

max_connect_errors: A host is blocked from further connections if there are more than this number of interrupted connections. max_user_connections: Maximum number of simultaneous connections allowed to any given MySQL account.

What is max_ connect_ errors in MySQL?

Summary: The MySQL variable max_connect_errors may be increased from the default of 100 to prevent an error and blocking of a known host connecting to the MySQL database.


3 Answers

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
like image 147
Kaanon MacFarlane Avatar answered Oct 12 '22 23:10

Kaanon MacFarlane


It seems Amazon now allows changing this parameter.

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

like image 27
Jaka Jančar Avatar answered Oct 12 '22 22:10

Jaka Jančar


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

like image 41
davidjbullock Avatar answered Oct 12 '22 22:10

davidjbullock