Host is blocked because of many connection errors; Unblock with ' mysqladmin flush-hosts '

Source: Internet
Author: User

Error: Host is blocked because of many connection errors; Unblock with ' mysqladmin flush-hosts '

Reason:

Congestion caused by the same IP in a short period of time resulting in too many (exceeding the maximum value of MySQL database max_connection_errors) interrupted database connections;

Workaround:

1, increase the allowable number of max_connection_errors (Temporary Cure):

① into MySQL database view max_connection_errors: show variables like '%max_connection_errors% ';

② Modify the number of Max_connection_errors: set global max_connect_errors = +;

③ See if the change was successful:show variables like '%max_connection_errors% ';

2, use mysqladmin flush-hosts command to clean up the Hosts file (do not know mysqladmin in which directory can use command lookup:whereis mysqladmin);

① in the found directory using the command to modify:/usr/bin/mysqladmin flush-hosts-h192.168.1.1 -p3308 -uroot-prootpwd;

mysqladmin-u root-p flush-hosts

Note:

Where the port number, user name, password can be added and modified as needed;

Configuration has master/slave master and slave database to the main library and from the library are modified again (I ate this loss obviously very easy several command results toss the most days);

The second step can also be done in the database, the command is as follows:flush hosts;


This article from "Nicol Lock Silk Sorrow" blog, please make sure to keep this source http://smoke520.blog.51cto.com/9256117/1835147

Host is blocked because of many connection errors; Unblock with ' mysqladmin flush-hosts '

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.