新装的navicat premium管理工具,结果连接本地数据库时报错,1251 - Client does not support authentication protocol requested by server; consider upgrading MySQL
在网上找了下解决方法,在这里记录一下;
原因:网上说出现这种情况的原因是:mysql8 之前的版本中加密规则是mysql_native_password,而在mysql8之后,加密规则是caching_sha2_password
解决问题方法有两种:
方法1.升级navicat驱动;
方法2.把mysql用户登录密码加密规则还原成mysql_native_password.
1
方法二:使用navicat prenium,查看root的plugin列值
select host,user,plugin,authentication_string from mysql.user;
如果user中的root行的plugin值为caching_sha2_password,则需要修改;
执行修改密码sql语句
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'newpassword';
#newpassword是我们新设置的密码