Could not obtain connection to query metadata : Public Key Retrieval is not allowed

简介: Could not obtain connection to query metadata : Public Key Retrieval is not allowed

您应该将客户端选项添加到 MySQL 连接器中,

allowPublicKeyRetrieval=true

以允许客户端自动从服务器请求公钥。

AllowPublicKeyRetrieval=True

允许恶意代理执行 MITM 攻击以获取纯文本密码,因此默认情况下它是false!必须显式开启。

也可以使用如下配置:

useSSL=false

所以,最终修改 db 配置如下即可:

jdbc:mysql://localhost:3306/db?allowPublicKeyRetrieval=true&useSSL=false


目录
相关文章
|
5月前
|
关系型数据库 MySQL 数据安全/隐私保护
问题:ERROR 1819 (HY000) Your password does not satisfy the current policy requirements
问题:ERROR 1819 (HY000) Your password does not satisfy the current policy requirements
37 0
|
6月前
|
关系型数据库 MySQL 数据库
MySQL8报错:Public Key Retrieval is not allowed
MySQL8报错:Public Key Retrieval is not allowed
3180 1
|
缓存 关系型数据库 MySQL
【异常解决】缓存报错:Null key returned for cache operation (maybe you are using named params on classes withou
【异常解决】缓存报错:Null key returned for cache operation (maybe you are using named params on classes withou
651 0
|
Linux
ERROR: 2 matches found based on name: network product-server_default is ambiguous
ERROR: 2 matches found based on name: network product-server_default is ambiguous
161 0
Optional int parameter ‘id‘ is present but cannot be translated into a null value due to being ……
Optional int parameter ‘id‘ is present but cannot be translated into a null value due to being ……
304 0
|
Java 数据库连接 mybatis
A query was run and no Result Maps were found for the Mapped Statement
A query was run and no Result Maps were found for the Mapped Statement
221 0
|
关系型数据库 MySQL 数据库
当你遇到Error: ER_TRUNCATED_WRONG_VALUE_FOR_FIELD: Incorrect string value:
当你遇到Error: ER_TRUNCATED_WRONG_VALUE_FOR_FIELD: Incorrect string value:
|
关系型数据库 MySQL 数据安全/隐私保护