• 等保审核 --- MySQL连接控制插件


    环境介绍:

    系统版本:Centos 7 

    MySQL版本: 5.7.19(只有5.7.17版本后才有此插件)

    架构: 主从架构

    控制插件:

    1). CONNECTION_CONTROL: 控制登录失败的次数及延迟响应时间
    2). CONNECTION_CONTROL_FAILED_LOGIN_ATTEMPTS: 记录登录失败的操作日志

    操作过程:

    1). 安装插件
    2). 安装后配置
    3). 增加至配置文件中

    配置说明:

    1). connection_control_min_connection_delay = 3000 : 当超过允许失败的次数时,将会延迟登录,此为最小延迟登录时间
    2). connection_control_max_connection_delay = 86400 : 最大延迟登录时间
    3). connection_control_failed_connections_threshold = 2 : 允许验证的次数

    一、 安装插件

    mysql> install plugin connection_control soname 'connection_control.so';
    mysql> show plugins;
    CONNECTION_CONTROL | ACTIVE | AUDIT | connection_control.so | GPL
    
    mysql> show variables like '%connection_control%';
    +-------------------------------------------------+-------+
    | Variable_name | Value                      |
    +-------------------------------------------------+-------+
    | connection_control_failed_connections_threshold | 3    |
    | connection_control_max_connection_delay         | 86400 |
    | connection_control_min_connection_delay         | 6000  |
    +-------------------------------------------------+-------+

    二、 配置插件中参数

    mysql> set global connection_control_failed_connections_threshold=2;
    mysql> set global connection_control_min_connection_delay=3000;

     

    三、 根据自己环境配置到配置文件中固定

    ~]# vim /etc/my.cnf
    # 连接控制插件,重启后生效;
    plugin-load-add = connection_control.so
    connection_control_min_connection_delay = 3000
    connection_control_max_connection_delay = 86400
    connection_control_failed_connections_threshold = 2
  • 相关阅读:
    5.1.5 JunkMail Filter
    POJ1067 取石子游戏 跪跪跪,很好的博弈论
    USACO Section 3.2 Magic Squares (msquare)
    5.1.1 A Bug's Life
    USACO Section 3.3 Riding The Fences (fence)
    USACO Section 3.1 Stamps (stamps)
    5.2.7 Entropy
    USACO Section 3.1 AgriNet (agrinet)
    5.1.8 How Many Answers Are Wrong
    4.3.6 N皇后问题
  • 原文地址:https://www.cnblogs.com/k-free-bolg/p/13601285.html
Copyright © 2020-2023  润新知