• ADADADADAD

    mysql 错误号码1129 解决方法[ mysql数据库 ]

    mysql数据库 时间:2024-12-03 10:31:01

    作者:文/会员上传

    简介:

    SQLyog连接mysql 错误号码1129:mysql error 1129: Host 'bio.chip.org' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'。解决方法:

    以下为本文的正文内容,内容仅供参考!本站为公益性网站,复制本文以及下载DOC文档全部免费。

    SQLyog连接mysql 错误号码1129:

    mysql error 1129: Host 'bio.chip.org' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'。

    解决方法:

    cmd命令行:

    mysqladmin flush-host -h 127.0.0.1 -u root -p123456

    解决。

    扩展学习

    错误:Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

    原因:

    同一个ip在短时间内产生太多(超过mysql数据库max_connection_errors的最大值)中断的数据库连接而导致的阻塞;

    解决方法:

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

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

    ② 修改max_connection_errors的数量为1000:set global max_connect_errors = 1000;

    ③ 查看是否修改成功:show variables like '%max_connection_errors%';

    2、使用mysqladmin flush-hosts命令清理一下hosts文件(不知道mysqladmin在哪个目录下可以使用命令查找:whereis mysqladmin);

    ① 在查找到的目录下使用命令修改:/usr/bin/mysqladmin flush-hosts -h292.168.1.1-P3308-uroot-prootpwd;

    备注:

    其中端口号,用户名,密码都可以根据需要来添加和修改;

    配置有master/slave主从数据库的要把主库和从库都修改一遍的(我就吃了这个亏明明很容易的几条命令结果折腾了大半天);

    第二步也可以在数据库中进行,命令如下:flush hosts;

    大多数的百度结果都是这样,但是对于我的数据库连接还是不行,经多次验证,发现需要加上主机地址,即执行:mysqladmin flush-hosts -h 127.0.0.1 -uroot -p命令

    以上就是本次解决的详细方法和步骤,感谢大家对的支持。

    mysql 错误号码1129 解决方法.docx

    将本文的Word文档下载到电脑

    推荐度:

    下载
    热门标签: mysql错误1129