zoukankan      html  css  js  c++  java
  • MairaDB中,MySql Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' 解决方法

    MairaDB中,MySql Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' 解决方法

     
    • 环境:linux,10.0.38-MariaDB,

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

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

    解决方法:

    1.进入linux,使用命令:mysql --help |grep Distrib 查看MariaDB版本

    2.查看mysql的mariaDB版本信息和路径,使用命令:mysqladmin -u root -p version

     

    3.登录进入mariaDB。 使用命令:mysql -uroot -praising321654


     

    4.查看当前最大errors数,并且修改成1000。
    命令:
    ① 进入Mysql数据库查看max_connection_errors: show global variables like '%max_connection_errors%';
    ② 修改max_connection_errors的数量为1000: set global max_connect_errors = 1000;
    ③ 查看是否修改成功:show global variables like '%max_connection_errors%';


     

    5.为了永久生效,最好清理一下host文件。直接使用命令:flush hosts;


     

    通过以上步骤,最后就不会出现
    Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'的提示了。

    好好学习,天天向上,发家致富。
  • 相关阅读:
    Qt拖放功能
    CUDA笔记 -- 1
    c/c++笔记--5
    SpringBoot注解大全
    Java集合图谱
    sql优化的几种方法
    Spring 体系结构详解
    2019年 Java 面试题解析
    IntelliJ IDEA 快捷键大全
    java集合继承关系
  • 原文地址:https://www.cnblogs.com/VivianBai/p/mariadbwrong.html
Copyright © 2011-2022 走看看