MySQL8.0新的密码认证方式
The caching_sha2_password and sha256_password authentication plugins provide more secure password encryption than the mysql_native_password plugin, and caching_sha2_password provides better performance than sha256_password. Due to these superior security and performance characteristics of caching_sha2_password, it is as of MySQL 8.0 the preferred authentication plugin, and is also the default authentication plugin rather than mysql_native_password. This change affects both the server and the libmysqlclient client library:
MySQL8以前版本使用的密码加密规则是mysql_native_password
MySQL8使用的密码加密规则是caching_sha2_password
方法一:修改用户密码和加密方式
use mysql
ALTER USER 'root'@'localho