mysql配置输入错误密码3次后锁定60s
mysql配置输入错误密码3次后锁定60s
 
 1、安装插件
 INSTALL PLUGIN CONNECTION_CONTROL SONAME 'connection_control.so';
 INSTALL PLUGIN CONNECTION_CONTROL_FAILED_LOGIN_ATTEMPTS SONAME 'connection_control.so';
 
 2、验证是否安装成功
 SHOW VARIABLES LIKE 'connection_control%';
 
 3、增加配置
 [mysqld]
 connection-control-failed-connections-threshold=3
 connection-control-min-connection-delay=60000 # 锁定时间,单位毫秒
 connection-control-max-connection-delay=60000 # 可选,设置最大锁定时间
 
 4、重启mysql服务
 systemctl restart mysqld
 或者
 docker restart mysql
