update
This commit is contained in:
parent
8e95484615
commit
abe83ec6bb
@ -427,3 +427,26 @@ show global status where Variable_name in
|
|||||||
lines terminated by '\n';
|
lines terminated by '\n';
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## mysql8 配置登录失败 5 次锁定 5 分钟
|
||||||
|
- 安装插件
|
||||||
|
```
|
||||||
|
docker exec -ti mysql mysql -e "
|
||||||
|
install plugin CONNECTION_CONTROL soname 'connection_control.so';
|
||||||
|
install plugin CONNECTION_CONTROL_FAILED_LOGIN_ATTEMPTS soname 'connection_control.so';
|
||||||
|
"
|
||||||
|
```
|
||||||
|
|
||||||
|
- 查看插件列表
|
||||||
|
```
|
||||||
|
docker exec -ti mysql mysql -e "show plugins"
|
||||||
|
# 此时会看到最后两行时新激活的插件
|
||||||
|
```
|
||||||
|
|
||||||
|
- 修改 my.cnf,增加两行
|
||||||
|
```
|
||||||
|
connection-control-failed-connections-threshold=5
|
||||||
|
connection-control-min-connection-delay=300000
|
||||||
|
```
|
||||||
|
|
||||||
|
- 重启 mysql
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user