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

连接MySQL错误“plugin caching_sha2_password could not be loaded”的解决办法

时间:2019-05-09 18:27:16      阅读:2099      评论:0      收藏:0      [点我收藏+]

标签:user   localhost   mys   use   数据库   local   数据   alter   ide   

MySQL新版默认使用caching_sha2_password作为身份验证插件,而旧版是使用mysql_native_password。
当连接MySQL时报错“plugin caching_sha2_password could not be loaded”时,可换回旧版插件。

mysql -hlocalhost -uroot -p123456 //进入数据库
use mysql;
ALTER USER root@localhost IDENTIFIED WITH mysql_native_password BY ‘123456‘; //123456是密码
FLUSH PRIVILEGES

 

连接MySQL错误“plugin caching_sha2_password could not be loaded”的解决办法

标签:user   localhost   mys   use   数据库   local   数据   alter   ide   

原文地址:https://www.cnblogs.com/maluscalc/p/10840162.html

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