360SDN.COM

首页/MySQL/列表

navicat连接MySQL8.0出现2059错误(consider upgrading MySQL client)

来源:  2018-07-17 13:44:39    评论:0点击:

已经给了远程连接权限(update mysql.user set host = "%" where user = 'root'; flush privileges;

连接错误提示:

Error: 1251 - Client does not support authentication protocol requested by server; consider upgrading MySQL client

 

解决方案:执行以下sql

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '密码'

  在navicat链接mysql8以后的版本时,会出现2059的错误,这个错误出现的原因是在mysql8之前的版本中加密规则为mysql_native_password,而在mysql8以后的加密规则为caching_sha2_password。解决此问题有两种方法,一种是更新navicat驱动来解决此问题,一种是将mysql用户登录的加密规则修改为mysql_native_password。本文采用第二种方式。

ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; #修改加密规则  
 
 
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';  #更新一下用户的密码


FLUSH PRIVILEGES; #刷新权限

此问题得以解决

为您推荐

友情链接 |九搜汽车网 |手机ok生活信息网|ok生活信息网|ok微生活
 Powered by www.360SDN.COM   京ICP备11022651号-4 © 2012-2016 版权