您的位置:首页 > 数据库 > MySQL

"Host 'xxx.xxx.xxx.xx' is blocked because of many connection errors; unblock with 'mysqladmin flush-

2015-09-09 09:50 525 查看
错误:java.sql.SQLException 

MESSAGE: null, message from server: "Host 'xxx.xxx.xxx.xx' is blocked because of many connection errors; unblock with 'mysqladmin flush-

1、进入mysql安装目录用mysqladmin命令执行 flush-hosts就搞定了,如在我的linux系统中
/usr/bin/mysqladmin -u root -p  flush-hosts

2、进入mysql:mysql -uroot -pmysql

提高允许的max_connection_errors数量(治标不治本):

  ① 进入Mysql数据库查看max_connect_errors: show variables like '%max_connect_errors%';

    ② 修改max_connec_errors的数量为1844674407370954751(能设多大,设多大): 
set global max_connect_errors = 1844674407370954751;

  ③ 查看是否修改成功:show variables like '%max_connect_errors%';
   show variables like "max_%"; 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  mysql