时间:2021-07-01 10:21:17 帮助过:6人阅读
FLUSH PRIVILEGES;
方法二:
编辑my.cnf文件,更改默认的身份认证插件。比如说:
vim /data/mysql/mysql_3306/my_3306.cnf
# 在[mysqld]中添加下边的代码
default_authentication_plugin=mysql_native_password
这个需要重启服务才生效。
mysql> select user,host,plugin from mysql.user; +------------------+-----------+-----------------------+ | user | host | plugin | +------------------+-----------+-----------------------+ | bak | % | mysql_native_password | | monitor | % | mysql_native_password | | repuser | % | caching_sha2_password | | mysql.infoschema | localhost | caching_sha2_password | | mysql.session | localhost | caching_sha2_password | | mysql.sys | localhost | caching_sha2_password | | repuser | localhost | caching_sha2_password | | root | localhost | caching_sha2_password | +------------------+-----------+-----------------------+ 8 rows in set (0.00 sec)
MySQL 8.0 配置mysql_native_password身份验证插件的密码
标签:style 无法 nat set cal sch local localhost plugin