Closed gitava closed 4 years ago
as per https://www.cnblogs.com/dobbin2018/p/9645872.html
分析:
1)什么是caching_sha2_password?
mysql的一个认证的插件——MySQL 8.0.4开始默认使用caching_sha2_password作为认证的插件,对于之前的版本的mysql,默认的认证插件为mysql_native_password。
解决方法:
1)在mysql主机运行如下命令
2)更改加密方式
ALTER USER 'master'@'%' IDENTIFIED WITH mysql_native_password BY 'MyNewPass!'; 3)没了。
mysql> select host,user,plugin from mysql.user;
+-----------+------------------+-----------------------+
| host | user | plugin |
+-----------+------------------+-----------------------+
| % | hive | caching_sha2_password |
| localhost | mysql.infoschema | caching_sha2_password |
| localhost | mysql.session | caching_sha2_password |
| localhost | mysql.sys | caching_sha2_password |
| localhost | root | caching_sha2_password |
+-----------+------------------+-----------------------+
5 rows in set (0.00 sec)
mysql> ALTER USER 'hive'@'%' IDENTIFIED WITH mysql_native_password BY '!mySQL123!';
Query OK, 0 rows affected (0.05 sec)
Problem solved!!!
try to remote log onto mysql server...get this error.