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

时间:2018-07-03 15:04:39   收藏:0   阅读:3983

在刚安装好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  解决

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!