Navicat无法连接mysql8.0的解决方法
时间:2023年11月24日
浏览:次
使用MySQL客户端Navicat连接数据库MySQL8.0,MySQL8.0 之前的版本中加密规则是mysql_native_password,而MySQL8.0,加密规则是caching_sha2_password
在DOS下登录mysql,再执行以下代码即可:
alter
user 'root'@'localhost'
identified by
'新密码'
password expire never;
alter user 'root'@'localhost' identified with mysql_native_password by '新密码';
alter user 'root'@'localhost' identified with mysql_native_password by '新密码';