mysql会话控制限制登录次数(connection_control插件)-成都快上网建站

mysql会话控制限制登录次数(connection_control插件)

数据库环境:

成都创新互联公司是工信部颁发资质IDC服务器商,为用户提供优质的雅安移动机房服务

Server version: 5.6.41 MySQL Community Server (GPL)


1、查看用户

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

mysql会话控制限制登录次数(connection_control插件)mysql会话控制限制登录次数(connection_control插件)

2、安装插件

安装方式1:

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

mysql会话控制限制登录次数(connection_control插件)mysql会话控制限制登录次数(connection_control插件)

mysql> show plugins;

mysql会话控制限制登录次数(connection_control插件)mysql会话控制限制登录次数(connection_control插件)

安装方式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%";

mysql会话控制限制登录次数(connection_control插件)mysql会话控制限制登录次数(connection_control插件)

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

mysql会话控制限制登录次数(connection_control插件)mysql会话控制限制登录次数(connection_control插件)

5、卸载:

mysql> uninstall plugin CONNECTION_CONTROL;

6、总结

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


分享标题:mysql会话控制限制登录次数(connection_control插件)
链接URL:http://kswjz.com/article/giisih.html
扫二维码与项目经理沟通

我们在微信上24小时期待你的声音

解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流