This section describes how to install and uninstall the 本节介绍如何安装和卸载validate_password密码验证组件。有关安装和卸载组件的一般信息,请参阅第5.5节,“MySQL组件”。validate_password
password-validation component. For general information about installing and uninstalling components, see Section 5.5, “MySQL Components”.
If you install MySQL 8.0 using the MySQL Yum repository, MySQL SLES Repository, or RPM packages provided by Oracle, the 如果您使用MySQL Yum存储库、MySQL SLES存储库或Oracle提供的RPM包安装MySQL 8.0,则首次启动MySQL服务器后,默认情况下会启用validate_password
component is enabled by default after you start your MySQL Server for the first time.validate_password
组件。
Upgrades to MySQL 8.0 from 5.7 using Yum or RPM packages leave the 使用Yum或RPM软件包从5.7升级到MySQL 8.0时,将保留validate_password
plugin in place. validate_password
插件。To make the transition from the 要从validate_password插件转换到validate_password
plugin to the validate_password
component, see Section 6.4.3.3, “Transitioning to the Password Validation Component”.validate_password
组件,请参阅第6.4.3.3节,“转换到密码验证组件”。
To be usable by the server, the component library file must be located in the MySQL plugin directory (the directory named by the 为了让服务器使用,组件库文件必须位于MySQL插件目录(由plugin_dir
system variable). plugin_dir
系统变量命名的目录)中。If necessary, configure the plugin directory location by setting the value of plugin_dir
at server startup.
To install the 要安装validate_password
component, use this statement:validate_password
组件,请使用以下语句:
INSTALL COMPONENT 'file://component_validate_password';
Component installation is a one-time operation that need not be done per server startup. 组件安装是一次性操作,不需要在每次服务器启动时完成。INSTALL COMPONENT
loads the component, and also registers it in the mysql.component
system table to cause it to be loaded during subsequent server startups.INSTALL COMPONENT
加载组件,并将其注册到mysql.component
系统表中,以便在后续服务器启动期间加载。
To uninstall the 要卸载validate_password
component, use this statement:validate_password
组件,请使用以下语句:
UNINSTALL COMPONENT 'file://component_validate_password';
UNINSTALL COMPONENT
unloads the component, and unregisters it from the mysql.component
system table to cause it not to be loaded during subsequent server startups.UNINSTALL COMPONENT
卸载组件,并将其从mysql.component
系统表中注销,以使其在后续服务器启动期间不会加载。