还有其他解决Public Key Retrieval is not allowed错误的方法吗?
时间: 2024-01-25 10:12:46 浏览: 174
以下是另外两种解决 "Public Key Retrieval is not allowed" 错误的方法:
方法一:使用allowPublicKeyRetrieval参数
在连接数据库的URL中添加allowPublicKeyRetrieval参数,并将其设置为true。这将允许从服务器检索公钥,解决 "Public Key Retrieval is not allowed" 错误。
```python
jdbc:mysql://localhost:3306/mydatabase?allowPublicKeyRetrieval=true
```
方法二:更新MySQL版本
如果您的MySQL版本较旧,可能会出现 "Public Key Retrieval is not allowed" 错误。尝试更新MySQL版本到最新版本,以解决此问题。
请注意,第二种方法可能需要管理员权限或与数据库管理员联系。
阅读全文
相关推荐







