default_authentication_plugin - xiaoboluo768/qianjinliangfang GitHub Wiki
- 设置默认的用户身份验证插件。
- 有效值为:
- mysql_native_password:使用mysql native认证插件,详情参考链接:https://dev.mysql.com/doc/refman/5.7/en/native-pluggable-authentication.html
- sha256_password:使用SHA-256认证插件,详情参考链接:https://dev.mysql.com/doc/refman/5.7/en/sha256-pluggable-authentication.html
- 注意:如果此变量的值不是mysql_native_password,因为MySQL 5.5.7之前的mysql客户端不支持mysql_native_password身份验证协议之外的协议,所以这个时候mysql客户端无法连接到server
- default_authentication_plugin值影响如下:
- CREATE USER或GRANT语句创建用户时,如果未明确指定用户认证插件,则默认使用该变量指定的值
- old_passwords系统变量会影响使用mysql_native_password或sha256_password身份验证插件的帐户的密码哈希值。old_passwords会根据default_authentication_plugin设置的不同认证插件来调整密码哈希方法所需的值
- 如果客户端成功连接到Server,且使用了与服务端不同的密码认证插件,则在执行CREATE USER和GRANT语句创建用户并设置密码时会报错,可以使用--default-authentication-plugin命令行选项指定与server相同的密码认证插件
- 全局变量,只读变量,枚举类型,默认值为mysql_native_password(8.0中默认值为sha256_password),有效值为:mysql_native_password、sha256_password,MySQL 5.7.2版本引入
- 有效值为:
上一篇:slave_max_allowed_packet | 下一篇:tmpdir