environment: linux, mysql5.5.21
error: host is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts’
reason:
The same IP generates too much in a short time (more than MySQL database)_ connection_ The maximum value of errors) caused by the interrupted database connection
solution:
1. Increase allowed Max_ connection_ Number of errors
Enter MySQL database to view max_ connection_ errors:show variables like ‘%max_ connection_ errors%’;
② modify max_ connection_ The number of errors is 1000: set global max_ connect_ errors = 1000;
(3) check whether the modification is successful: show variables like% max_ connection_ errors%’;
2. Use the mysqladmin flush hosts command to clean up the hosts file (I don’t know under which directory mysqladmin can be found: Where is mysqladmin )
(1) use the command to modify in the found Directory: usr/bin/ mysqladmin flush hosts – h192.168.1.1 – p3308 – uroot – prootpwd
Remarks:
Port number, user name and password can be added and modified as needed
If the master/slave database is configured, it is necessary to modify both the master and slave databases (I just suffered from some very easy commands, and it took me a long time)
The second step can also be performed in the database. The command is as follows: flush hosts
Similar Posts:
- MySql Host is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts’ [How to Solve]
- [Solved] MySql Host is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts…
- [Solved] JMeter Connect Database error: unblock with ‘mysqladmin flush hosts’
- host blocked because of many connection errors [How to Solve]
- [Solved] Mysql Got fatal error 1236 from master when reading data from binary log: ‘Could not find first log file name in binary log index file’
- Obstacle Elimination set: Slave_ IO_ R unning:No And slave_ IO_ R unning:Connecting reason
- How to Solve MYSQL ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repository
- mysql Remote connection problems: Lost connection to MySQL server at ‘reading initial communication packet’, syste…
- ERROR 2006 (HY000): MySQL server has gone away No
- mysql Slave_IO_Running:NO [How to Solve]