安装MySQL8后,Dos命令可以正常进入数据库,但Navicat无法连接
解决办法:
使用Dos命令进入mysql数据库,然后输入:
mysql> alter user root@localhost identified by 'password' password expire never; mysql> alter user root@localhost identified with mysql_native_password by 'password'; mysql> flush privileges; # 刷新权限
password为你自己的sql密码,每个命令执行后提示OK即可。