ERROR 1129 (HY000): Host ‘::ffff:192.168.161.106‘ is temporarily blocked due to too many authenticat

One problem description

A colleague reported that the program could not connect to the database, and an error was reported:

ERROR 1129 (HY000): Host '::ffff:192.168.161.106' is temporarily blocked due to too many authentication failures.

Our database architecture is mariadb (one master and one slave) + maxscale.

The strange thing is that the master and slave of mariadb can be connected normally on 192.168.161.106, but it cannot be accessed from maxscale, and the above error is reported.

Two troubleshooting

By viewing the mariadb error log, you can see the following error:

2021-01-07 14:08:17 155876 [Warning] Access denied for user 'rms'@'%' to database 'rms_data'

Execute show grants for'rms_data'; it is found that the rms user does not have permission to access rms_data

Three solutions

Grant rms user access to rms_data:

grant all privileges on rms_data.* to rms;

Execute flush hosts ;

Four summary

When the program connects to the database through maxscale, if the user does not have permission to access a certain database to be accessed, the program will frequently fail to connect to the database, and the database will be suspected of brute force cracking. Therefore, the server where the program is located will be blocked and forbidden to connect again, even if If you change the user, you can't connect.

Therefore, the issue of user permissions cannot be ignored, and don't forget to authorize.

 

Guess you like

Origin blog.csdn.net/yabignshi/article/details/112310064