Public Key Retrieval is not allowed

运行jar程序报错

Public Key Retrieval is not allowed

 

1.修改程序配置文件中的连接数据库的url,加上allowPublicKeyRetrieval=true参数,失败

2.修改default_authentication_plugin设置,在my.cnf中增加

[mysqld]

default_authentication_plugin=mysql_native_password

然后mysql命令行执行ALTER USER 'username'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';

最后在程序配置文件中的连接数据库的url中添加时区参数serverTimezone=Asia/Shanghai ,成功

posted @   leihongnu  阅读(244)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
点击右上角即可分享
微信分享提示