mysql.cj.exceptions.UnableToConnectException: Public Key Retrieval is not allowed
时间: 2023-10-15 07:26:43 浏览: 153
mysql.cj.exceptions.UnableToConnectException: Public Key Retrieval is not allowed 是一个MySQL连接异常。这个异常表示无法进行公钥检索。为了解决这个问题,可以在MySQL的连接URL中增加参数allowPublicKeyRetrieval=true。例如,jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true。这样设置后,就能够允许公钥检索,解决了异常问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [Caused by: com.mysql.cj.exceptions.UnableToConnectException: Public Key Retrieval is not](https://blog.csdn.net/weixin_44299027/article/details/131766486)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *3* [com.mysql.cj.exceptions.UnableToConnectException: Public Key Retrieval is no](https://blog.csdn.net/a13662080711/article/details/124837085)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文