美文网首页
java.sql.SQLException: Unable to

java.sql.SQLException: Unable to

作者: 潦倒神仙 | 来源:发表于2019-10-21 17:24 被阅读0次

刚装了mysql8.0,用navicat登陆不了,会出现2059错误,只能用命令行登陆

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登陆了

相关文章

网友评论

      本文标题:java.sql.SQLException: Unable to

      本文链接:https://www.haomeiwen.com/subject/ochajftx.html