zl程序教程

您现在的位置是:首页 >  数据库

当前栏目

MySQL Variables default_authentication_plugin 数据库 参数变量解释及正确配置使用

mysql数据库配置变量 使用 解释 参数 正确
2023-06-13 09:11:25 时间

用途

default_authentication_plugin是MySQL的参数变量,用于指定MySQL的验证插件的类型。其可设置的参数有mysql_native_password、sha256_password、caching_sha2_password。

设置该变量的方式如下:

1、在MySQL中执行命令
SET GLOBAL default_authentication_plugin = 插件类型

2、修改MySQL配置文件my.cnf中[mysqld]节点下default-authentication-plugin参数值。

例如:default-authentication-plugin=caching_sha2_password

3、重启MySQL服务

官方英文解释 default_authentication_plugin


sha256_password: Use SHA-256 passwords;
see Section 6.4.1.5, “SHA-256 Pluggable Authentication”.


If this variable has a value other than
mysql_native_password, clients older than
MySQL 5.5.7 cannot connect because, of the permitted default
authentication plugins, they understand only the
mysql_native_password authentication
protocol.

The
default_authentication_plugin
value affects these aspects of server operation:


It determines which authentication plugin the server
assigns to new accounts created by
CREATE USER and
GRANT statements that do
not explicitly specify an authentication plugin.


The old_passwords system
variable affects password hashing for accounts that use
the mysql_native_password or
sha256_password authentication plugin.
If the default authentication plugin is one of those
plugins, the server sets
old_passwords at startup
to the value required by the plugin password hashing
method.


For an account created with either of the following
statements, the server associates the account with the
default authentication plugin and assigns the account the
given password, hashed as required by that plugin:

CREATE USER ... IDENTIFIED BY "cleartext password";

GRANT ... IDENTIFIED BY "cleartext password";


For an account created with either of the following
statements, the server associates the account with the
default authentication plugin and assigns the account the
given password hash, if the password hash has the format
required by the plugin:

CREATE USER ... IDENTIFIED BY PASSWORD "encrypted password";

GRANT ... IDENTIFIED BY PASSWORD "encrypted password";

If the password hash is not in the format required by the
default authentication plugin, the statement fails.


我想要获取技术服务或软件
服务范围:MySQL、ORACLE、SQLSERVER、MongoDB、PostgreSQL 、程序问题
服务方式:远程服务、电话支持、现场服务,沟通指定方式服务
技术标签:数据恢复、安装配置、数据迁移、集群容灾、异常处理、其它问题

本站部分文章参考或来源于网络,如有侵权请联系站长。
数据库远程运维 MySQL Variables default_authentication_plugin 数据库 参数变量解释及正确配置使用