8.4 中文镜像

MySQL 8.4 参考手册 · 中文镜像

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

打开官方英文原文 ↗

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

MySQL 8.4 参考手册 / 8 安全 / 8.6 MySQL 企业加密 / 8.6.1 MySQL Enterprise 加密安装和升级
中文点击中文段落可显示 / 隐藏英文原文本页译文覆盖 100%

8.6.1 MySQL 企业加密的安装和升级8.6.1 MySQL Enterprise Encryption Installation and Upgrading

这些功能由 MySQL 组件 component_enterprise_encryption 提供,安装该组件会安装所有功能。The functions are provided by a MySQL component component_enterprise_encryption, and installing the component installs all of the functions.

MySQL 企业加密功能由 MySQL component_enterprise_encryption 组件提供。有关升级信息,请参见 升级 MySQL 企业加密。MySQL Enterprise Encryption functions are provided by the MySQL component_enterprise_encryption component. For upgrade information, see Upgrading MySQL Enterprise Encryption.

如果您正在从早于 MySQL 8.0.30 的版本升级:在安装组件之前,使用 DROP FUNCTION 语句卸载任何旧功能:If you are upgrading from a release prior to MySQL 8.0.30: Before installing the component, unload any legacy functions using the DROP FUNCTION statement:

DROP FUNCTION asymmetric_decrypt;
DROP FUNCTION asymmetric_derive;
DROP FUNCTION asymmetric_encrypt;
DROP FUNCTION asymmetric_sign;
DROP FUNCTION asymmetric_verify;
DROP FUNCTION create_asymmetric_priv_key;
DROP FUNCTION create_asymmetric_pub_key;
DROP FUNCTION create_dh_parameters;
DROP FUNCTION create_digest;

函数名称必须以小写字母指定。该语句需要 DROP 权限,用于 mysql 数据库。The function names must be specified in lowercase. The statements require the DROP privilege for the mysql database.

要安装该组件,请执行此 INSTALL COMPONENT 语句:To install the component, issue this INSTALL COMPONENT statement:

INSTALL COMPONENT "file://component_enterprise_encryption";

INSTALL COMPONENT 需要 INSERT 权限用于 mysql.component 系统表,因为它会向该表中添加一行以注册组件。要验证组件是否已安装,请执行此处显示的语句:INSTALL COMPONENT requires the INSERT privilege for the mysql.component system table because it adds a row to that table to register the component. To verify that the component has been installed, issue the statement shown here:

SELECT * FROM mysql.component;

列在 mysql.component 中的组件会在启动序列期间由加载器服务加载。Components listed in mysql.component are loaded by the loader service during the startup sequence.

如果需要卸载组件,请执行 UNINSTALL COMPONENT 语句:If you need to uninstall the component, issue an UNINSTALL COMPONENT statement:

UNINSTALL COMPONENT "file://component_enterprise_encryption";

卸载该组件会卸载其所有功能。更多详情,请参见第 7.5.1 节,“安装和卸载组件”。Uninstalling the component uninstalls all of the functions. For more details, see Section 7.5.1, “Installing and Uninstalling Components”.

Note

安装该组件会安装其所有功能,因此您无需像旧版本的 MySQL 那样使用CREATE FUNCTION语句来创建它们。Installing the component installs all of its functions, so you do not need to create them using CREATE FUNCTION statements as in older releases of MySQL.

安装组件后,如果您希望组件功能支持对传统函数生成的内容进行解密和验证,请将 enterprise_encryption.rsa_support_legacy_padding 系统变量设置为 ON。另外,如果您想更改组件函数生成的 RSA 密钥允许的最大长度,请使用 enterprise_encryption.maximum_rsa_key_size 系统变量设置一个合适的最大值。有关配置信息,请参见 第 8.6.2 节,“配置 MySQL Enterprise 加密”。When you have installed the component, if you want the component functions to support decryption and verification for content produced by legacy functions, set the enterprise_encryption.rsa_support_legacy_padding system variable to ON. Also, if you want to change the maximum length allowed for the RSA keys generated by the component functions, use the enterprise_encryption.maximum_rsa_key_size system variable to set an appropriate maximum. For configuration information, see Section 8.6.2, “Configuring MySQL Enterprise Encryption”.