Public Key Retrieval is not allowed错误


今天在整合SSM时,出现错误Public Key Retrieval is not allowed,百度多次后解决办法最终解决办法有两种:

1. mysql5及之前的版本使用的是旧版驱动"com.mysql.jdbc.Driver",mysql6以及之后的版本需要更新到新版驱动,对应的Driver是"com.mysql.cj.jdbc.Driver",但是这个驱动错误的信息是"Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.",排除这个原因。
2. 连接数据库的url中,加上allowPublicKeyRetrieval=true参数。

最终,第2方案解决该问题。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM