剛裝了mysql8.0,用navicat登陸不了,會(huì)出現(xiàn)2059錯(cuò)誤,只能用命令行登陸
1.找到配置文件my.ini
將default_authentication_plugin=caching_sha2_password改為default_authentication_plugin=mysql_native_password
2.用命令行登陸
mysql -u root -p
123456
3.use mysql
4.ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
5.flush privileges;
6.可以用navicat登陸了