Why MySQL Connection Is Blocked of Many Connection Errors

Why MySQL connection is blocked of many connection errors?

MySQL blocks clients which error made while connecting to protect MySQL from malformed client.

So first, you need to find what sort of error is....

You might check MySQL error log in data directory. (typically hostname.err)

Or, you can increase max_connect_errors (what is current value?) maximum value depends on architecture. on 32 bit, 4294967295. 18446744073709547520 for 64 bit. (Manual)

mysql> SET GLOBAL max_connect_errors = 100000000;

But this is not real solution if error is frequently occurred.

FLUSH HOSTS can help you to eliminate blocked host right now.

mysql> FLUSH HOSTS;

If want to run from outside mysql console then use mysqladmin command:

# mysqladmin flush-hosts

MAMP: blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' in /wp-includes/wp-db.php

Resolved, had to login to the database on the server and type the following command in the SQL console.

FLUSH HOSTS

MySQL / phpMyadmin: many connection errors

From the manual: http://dev.mysql.com/doc/refman/4.1/en/blocked-host.html

The number of interrupted connect
requests allowed is determined by the
value of the max_connect_errors system
variable. After max_connect_errors
failed requests, mysqld assumes that
something is wrong (for example, that
someone is trying to break in), and
blocks the host from further
connections until you execute a
mysqladmin flush-hosts command or
issue a FLUSH HOSTS statement. See
Section 5.1.3, “Server System
Variables”.

You could be having network problems connecting to your database.

How to unblock with mysqladmin flush hosts

mysqladmin is not a SQL statement. It's a little helper utility program you'll find on your MySQL server... and "flush-hosts" is one of the things it can do. ("status" and "shutdown" are a couple of other things that come to mind).

You type that command from a shell prompt.

Alternately, from your query browser (such as phpMyAdmin), the SQL statement you're looking for is simply this:

FLUSH HOSTS;

http://dev.mysql.com/doc/refman/5.6/en/flush.html

http://dev.mysql.com/doc/refman/5.6/en/mysqladmin.html



Related Topics



Leave a reply



Submit