MySQL 服务器包含一个基于组件的基础设施,用于扩展服务器功能。组件提供可供服务器和其他组件使用的服务。(就服务使用而言,服务器本身也是一个组件,与其他组件平等。)组件之间仅通过它们提供的服务进行交互。MySQL Server includes a component-based infrastructure for extending server capabilities. A component provides services that are available to the server and other components. (With respect to service use, the server is a component, equal to other components.) Components interact with each other only through the services they provide.
MySQL 发行版包含多个实现服务器扩展的组件:MySQL distributions include several components that implement server extensions:
用于配置错误日志的组件。参见第 7.4.2 节,“错误日志”,以及第 7.5.3 节,“错误日志组件”。Components for configuring error logging. See Section 7.4.2, “The Error Log”, and Section 7.5.3, “Error Log Components”.
用于检查密码的组件。参见第 8.4.3 节,“密码验证组件”。A component for checking passwords. See Section 8.4.3, “The Password Validation Component”.
密钥环组件提供敏感信息的安全存储。参见第 8.4.4 节,“MySQL 密钥环”。Keyring components provide secure storage for sensitive information. See Section 8.4.4, “The MySQL Keyring”.
一个组件,使应用程序能够将其自己的消息事件添加到审计日志中。参见第 8.4.6 节,“审计消息组件”。A component that enables applications to add their own message events to the audit log. See Section 8.4.6, “The Audit Message Component”.
一个实现可加载函数以访问查询属性的组件。参见 第 11.6 节,“查询属性”。A component that implements a loadable function for accessing query attributes. See Section 11.6, “Query Attributes”.
一个用于调度主动执行任务的组件。参见 第 7.5.5 节,“调度器组件”。A component for scheduling actively executing tasks. See Section 7.5.5, “Scheduler Component”.
组件实现的系统和状态变量在组件安装时会被暴露,并且其名称以特定组件前缀开头。例如,log_filter_dragnet 错误日志过滤器组件实现了一个名为 log_error_filter_rules 的系统变量,其完整名称为 dragnet.log_error_filter_rules。引用此变量时,请使用完整名称。System and status variables implemented by a component are exposed
when the component is installed and have names that begin with a
component-specific prefix. For example, the
log_filter_dragnet error log filter component
implements a system variable named
log_error_filter_rules, the full name of which is
dragnet.log_error_filter_rules. To
refer to this variable, use the full name.
以下各节描述了如何安装和卸载组件,以及如何在运行时确定已安装的组件并获取有关它们的信息。The following sections describe how to install and uninstall components, and how to determine at runtime which components are installed and obtain information about them.
有关组件内部实现的信息,请参阅 MySQL 服务器 Doxygen 文档,可通过 https://dev.mysql.com/doc/index-other.html 访问。例如,如果您打算编写自己的组件,这些信息对于理解组件的工作原理非常重要。For information about the internal implementation of components, see the MySQL Server Doxygen documentation, available at https://dev.mysql.com/doc/index-other.html. For example, if you intend to write your own components, this information is important for understanding how components work.