8.4 中文镜像

MySQL 8.4 参考手册 · 中文镜像

正文为中文,英文原文默认隐藏。点击任意中文段落即可展开 / 收起对应英文原文。

打开官方英文原文 ↗

译文由机器翻译生成,仅供理解参考;有疑问请以官方英文原文为准。

中文点击中文段落可显示 / 隐藏英文原文本页译文覆盖 100%

8.4.2 连接控制插件8.4.2 Connection Control Plugins

MySQL 服务器包括一个插件库,使管理员能够在连续失败尝试次数达到可配置的限制后,对连接尝试的服务器响应引入越来越长的延迟。这一功能提供了一种威慑,可以减缓对 MySQL 用户账户的暴力破解攻击。该插件库包含两个插件:MySQL Server includes a plugin library that enables administrators to introduce an increasing delay in server response to connection attempts after a configurable number of consecutive failed attempts. This capability provides a deterrent that slows down brute force attacks against MySQL user accounts. The plugin library contains two plugins:

  • CONNECTION_CONTROL 检查传入的连接尝试,并在必要时对服务器响应添加延迟。该插件还公开了可配置其操作的系统变量以及提供基本监控信息的状态变量。CONNECTION_CONTROL checks incoming connection attempts and adds a delay to server responses as necessary. This plugin also exposes system variables that enable its operation to be configured and a status variable that provides rudimentary monitoring information.

    CONNECTION_CONTROL 插件使用审计插件接口(参见 编写审计插件)。为了收集信息,它订阅 MYSQL_AUDIT_CONNECTION_CLASSMASK 事件类,并处理 MYSQL_AUDIT_CONNECTION_CONNECT 和 MYSQL_AUDIT_CONNECTION_CHANGE_USER 子事件,以检查服务器在响应连接尝试前是否应引入延迟。The CONNECTION_CONTROL plugin uses the audit plugin interface (see Writing Audit Plugins). To collect information, it subscribes to the MYSQL_AUDIT_CONNECTION_CLASSMASK event class, and processes MYSQL_AUDIT_CONNECTION_CONNECT and MYSQL_AUDIT_CONNECTION_CHANGE_USER subevents to check whether the server should introduce a delay before responding to connection attempts.

  • CONNECTION_CONTROL_FAILED_LOGIN_ATTEMPTS 实现了一个 INFORMATION_SCHEMA 表,该表提供有关失败连接尝试的更详细的监控信息。有关此表的更多信息,请参见 第 28.6.2 节,“INFORMATION_SCHEMA CONNECTION_CONTROL_FAILED_LOGIN_ATTEMPTS 表”。CONNECTION_CONTROL_FAILED_LOGIN_ATTEMPTS implements an INFORMATION_SCHEMA table that exposes more detailed monitoring information for failed connection attempts. For more information about this table, see Section 28.6.2, “The INFORMATION_SCHEMA CONNECTION_CONTROL_FAILED_LOGIN_ATTEMPTS Table”.

以下部分提供有关连接控制插件的安装和配置的信息。The following sections provide information about connection control plugin installation and configuration.