数据库环境:

Server version: 5.6.41 MySQL Community Server (GPL)

1、查看用户

mysql> select Host,User from user where User='jiangjj';

2a2882f2384c68289f484afc1c0aeb16.png

2、安装插件

安装方式1:

mysql> Install plugin connection_control soname "connection_control.so";

219a8eea07b28e51bb2c2e0267b3bdba.png

mysql> show plugins;

25045850a6bc46d5ce4eb30f54567248.png

安装方式2:

# vim /etc/my.cnf

[mysqld]

#添加如下参数

plugin-load=CONNECTION_CONTROL=connection_control.so

connection_control_min_connection_delay=60000

重启即可

3、查看相关配置,进行调整

连续失败次数3和超过失败连接上限后的最小延迟登录时间为1分;

mysql> show variables like "%connection_control%";

2ff4f972ec20f2a68f88e5387f82ff43.png

4、测试:如果三次登录验证失败,将等待1分钟,如图

de6b3d44737b9586d87ab10b3a7819c0.png

5、卸载:

mysql> uninstall plugin CONNECTION_CONTROL;

6、总结

连续失败登录控制是生效,避免了大量的、非法连接×××的可能性,为了增加安全系数,可增加最小延迟时间。

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐