安裝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即可。