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

【问题记录】Navicat Premium连接mysql-8.0.17时出现2059 - Authentication plugin 'caching_sha2_password’....错误

时间:2019-08-18 21:45:17      阅读:172      评论:0      收藏:0      [点我收藏+]

标签:mysql   切换数据库   user   strong   not   刷新   题记   ges   分析   

问题描述:

  Navicat Premium连接mysql-8.0.17时出现2059 - Authentication plugin ‘caching_sha2_password’ cannot be loaded:......错误

问题分析:

  mysql8 之前的版本中加密规则是mysql_native_password,而在mysql8之后,加密规则是caching_sha2_password。

解决办法:

  1.登陆数据库:mysql - u root -p;

  2.切换数据库:use mysql;

  3.修改加密方式:ALTER USER ‘root‘@‘localhost‘ IDENTIFIED BY ‘password‘ PASSWORD EXPIRE NEVER;

  4.更新密码:ALTER USER ‘root‘@‘localhost‘ IDENTIFIED WITH mysql_native_password BY ‘自己的新密码‘;

  5.刷新权限:FLUSH PRIVILEGES;

  注:很多博客上都没有第3步,只有第4步,使得频繁报错,多亏了此博客

【问题记录】Navicat Premium连接mysql-8.0.17时出现2059 - Authentication plugin 'caching_sha2_password’....错误

标签:mysql   切换数据库   user   strong   not   刷新   题记   ges   分析   

原文地址:https://www.cnblogs.com/waterbbro/p/11373973.html

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