码迷,mamicode.com
首页 > 数据库 > 详细

远程连接mysql8.0,Error No.2058 Plugin caching_sha2_password could not be loaded

时间:2018-08-05 00:28:26      阅读:620      评论:0      收藏:0      [点我收藏+]

标签:could not   mysql8   通过   命令行   图片   oca   ges   erro   技术   

技术分享图片

    通过本地去连接远程的mysql时报错,原因时mysql8.0的加密方法变了。

    mysql8.0默认采用caching_sha2_password的加密方式

    第三方客户端基本都不支持这种加密方式,只有自带的命令行支持

    所以需要修改加密方式。

    首先进入mysql命令行    

    [root@localhost ~]# mysql -u root -p
    Enter password:

    第一步:修改加密方式

    ALTER USER‘root‘@‘localhost‘ IDENTIFIED BY ‘Qigaoxiang2018@‘ PASSWORD EXPIRE NEVER;

    第二步:重新修改密码

    ALTER USER‘root‘@‘%‘ IDENTIFIED WITH mysql_native_password BY ‘Qigaoxiang2018@‘;

    第三步:刷新(不做可能无法生效)

    FLUSH PRIVILEGES;

    

    之后可以成功连接。

    

    

    

    

 

远程连接mysql8.0,Error No.2058 Plugin caching_sha2_password could not be loaded

标签:could not   mysql8   通过   命令行   图片   oca   ges   erro   技术   

原文地址:https://www.cnblogs.com/goxcheer/p/9420538.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!