msyql系统变量max_connect_errors
来源:互联网 发布:英文美文软件 编辑:程序博客网 时间:2024/06/07 06:54
一、max_connect_error定义
max_connect_error 从字面意思上理解是最大的连接错误数,网上很多说法大多与暴力破解有关,然而平时我们使用的过程中发现,似乎并不是如此,下面我们实测一下
set global max_connect_errors=2;show variables like 'max_connect_errors';
我们创建一个普通用户来验证:
grant usage on *.* to test@'localhost' identified by '123456';
进行第一次错误登陆:
第二次错误登陆:
然后再用正确的密码登陆:
可以正常登陆,证明该参数与暴力破解没有半毛钱关系,那它这里的error又是什么呢?
我们看看官方的解释:
The value of the max_connect_errors system variable determines how many successive interrupted connection requests are permitted. (See Section 5.1.5, “Server System Variables”.) After max_connect_errors failed requests without a successful connection, mysqld assumes that something is wrong (for example, that someone is trying to break in), and blocks the host from further connections until you issue a FLUSH HOSTS statement or execute a mysqladmin flush-hosts command.
max_connect_errors的值决定了允许多少连续的被打断的连接,在这之后,mysql认为这些主机是有问题的,加入黑名单,而这份黑名单正是记录在performance_schema.host_cache这张表中。
二、max_connect_errors验证
当连接被中断时,mysql会把这个连接的host记录到perfomance_schema.host_cache这张表中,当着个记录超过max_connect_errors时,mysql认为这个host事有问题的,也就是从这个host上再不能有连接建立,但这个对本地的连接是无效的。
下面我对自己vps进行测试:
telnet **.**.**.** 3306
重复两次以上的操作。
select * from performance_schema.host_cache;
达到上限2,然后我们正常的用mysql客户端登陆:
出现如上错误,验证无误。
阅读全文
0 0
- msyql系统变量max_connect_errors
- msyql的几种变量
- msyql
- 关于mysql参数max_connect_errors
- 转 -- MySQL UNDERSTANDING MAX_CONNECT_ERRORS
- msyql读取表字段生成对应的java变量
- MSYQL中系统找不到指定的路径的解决方法
- Max_connect_errors – MySQL性能参数详解
- Max_connect_errors – MySQL性能参数详解
- msyql乱码
- msyql FILLFACTOR
- msyql基础
- msyql 关键字
- msyql kye
- msyql 常用命令
- msyql 事件
- msyql 事务
- 系统变量
- unity粒子系统碰撞
- (转载)SSH框架的整合详解(Struts2 + Spring + Hibernate)
- PDI FOR MAYA 学习笔记
- [DP] POJ 3666
- linux安装mysql报错
- msyql系统变量max_connect_errors
- Find the Closest Palindrome:寻找与给定目标大小最接近且尽可能小的回文
- 大型Java项目架构演进(小白)
- exiv2 visual studio 2015 上使用
- 17.12.19有感
- Spring Boot集成MyBatis、druid
- python(学习)四、 centos下python与yum重装
- 50-IO流(序列流-SequenceInputStream).
- 文件处理技术