【问题解决】连接mysql 8错误:authentication plugin 'caching_sha2_password

在刚安装好mysql8,使用native连接的时候报错

authentication plugin 'caching_sha2_password'...

首先确保服务已开启,然后通过cmd命令进入mysql的localhost数据库

mysql -hlocalhost -uroot -p123456

然后进入mysql数据库

use mysql;

修改密码

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '';
FLUSH PRIVILEGES;

重新连接数据库 

OK  解决

猜你喜欢

转载自www.cnblogs.com/sunny3096/p/9258013.html