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
You could be having network problems connecting to your database.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”.
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.htmlhttp://dev.mysql.com/doc/refman/5.6/en/mysqladmin.html
Related Topics
Php, Add a Newline with Implode
Use MySQL_Fetch_Array() with Foreach() Instead of While()
Symfony2:Two Forms in a Same Page
PHP Looping Through Multiple Arrays
Create Multidimensional Array Using a Foreach Loop
Add a Custom Checkbox in Woocommerce Checkout Which Value Shows in Admin Edit Order
Woocommerce Cart Quantity Base Discount
A Better Way to Replace Emoticons in PHP
How to Increase by 1 All Keys in an Array
PHP Exec() Command: How to Specify Working Directory
How to Sort Null Values Last Using Eloquent in Laravel
How to Remove Email Addresses and Links from a String in PHP
PHP - Display a 404 Error Without Redirecting to Another Page
What's the Difference Between Post and Raw Post in PHP at All