同一个ip在短期内产生太多(超过mysql数据库max_connection_errors的最大值)中断的数据库链接而致使的阻塞;mysql
解决方法:sql
一、提升容许的max_connection_errors数量(治标不治本):数据库
① 进入Mysql数据库查看max_connection_errors: show variables like '%max_connection_errors%';ip
② 修改max_connection_errors的数量为1000: set global max_connect_errors = 1000;io
③ 查看是否修改为功:show variables like '%max_connection_errors%';ast
二、使用mysqladmin flush-hosts 命令清理一下hosts文件(不知道mysqladmin在哪一个目录下能够使用命令查找:whereis mysqladmin);配置
① 在查找到的目录下使用命令修改:/usr/bin/mysqladmin flush-hosts -h192.168.1.1 -P3308 -uroot -prootpwd;密码
备注:方法
其中端口号,用户名,密码均可以根据须要来添加和修改;error
配置有master/slave主从数据库的要把主库和从库都修改一遍的(我就吃了这个亏明明很容易的几条命令结果折腾了大半天);
第二步也能够在数据库中进行,命令以下:flush hosts;