连接MySQL时报错:Public Key Retrieval is not allowed的解决方法

连接mysql时报错:Public Key Retrieval is not allowed(不允许公钥检索)

 

解决方法:连接设置——驱动属性——allowPublicKeyRetrieval=false(这里的运输公钥检索是默认关闭的,需要把它开启),改为allowPublicKeyRetrieval=true即可。

连接数据库后,如果不想把此项开启,那在改为false就行,连接过一次后面都可正常在重新连接使用,但是如果新增连接还是要把此项开启,不然还是会继续报错。

原文链接

https://www.jianshu.com/p/928eb43d0073

 

posted @ 2024-02-22 17:26  美羊羊永远爱喜羊羊  阅读(2383)  评论(0)    收藏  举报