刚装了mysql8.0,用navicat登陆不了,点击“打开连接”出现2059错误。
查找太多的解决方法,后来用命令行登陆解决了此问题。
1、找到MySql目录下的配置文件my.ini
增加default_authentication_plugin=mysql_native_password
或
将default_authentication_plugin=caching_sha2_password改为default_authentication_plugin=mysql_native_password
2、打开cmd系统命令,用命令行登陆
mysql -u root -p
Enter password:xxxxx
3、use mysql
4、ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
5、flush privileges;
6、可以用navicat登录了
本文介绍了解决使用Navicat登录MySQL8.0遇到的2059错误的方法。通过修改my.ini文件中的认证插件设置,使用命令行进行登录并更新root用户的身份验证方式,最终实现Navicat正常登录。
1393





