It’s the end of the year, it’s the middle of the night on Friday, and the disaster is not alone. After repairing redis, MySQL doesn’t stop
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;
Check whether the modification is successful: Show variables like% max_ connection_ errors%’;
2. Use the command mysqladmin flush hosts to clean up the hosts file (I don’t know which directory mysqladmin is in, I can use the command to find: where is mysqladmin)
In the found directory, use the command to modify/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 done 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…
- [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…
- mysql Slave_IO_Running:NO [How to Solve]
- [Solved] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=20131)