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


目录
相关文章
|
C#
C#—Collection was modified;enumeration operation may not execute
错误 Collection was modified; enumeration operation may not execute翻译是 集合已修改;枚举操作可能无法执行。也就是说我们在遍历集合等可迭代元素时,进行了集合的修改导致的错误。本质上因为Collection返回的IEnumerator把当前的属性暴露为只读属性,所以对其的修改会导致运行时错误,只需要把foreach改为for来遍...
523 0
|
Serverless
attempt to delete a method
attempt to delete a method
222 1
|
7月前
|
SQL IDE Java
hibernate5 Cannot create TypedQuery for query with more than one return using requested result type
hibernate5 Cannot create TypedQuery for query with more than one return using requested result type
80 0
|
7月前
|
关系型数据库 MySQL 数据库
MySQL8报错:Public Key Retrieval is not allowed
MySQL8报错:Public Key Retrieval is not allowed
3695 1
|
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
169 0
|
Java Go
ES 查询时提示:all shards failed [type=search_phase_execution_exception]
ES 查询时提示:all shards failed [type=search_phase_execution_exception]
ES 查询时提示:all shards failed [type=search_phase_execution_exception]
Elasticsearch exception [type=search_phase_execution_exception, reason=all shards failed]
Elasticsearch exception [type=search_phase_execution_exception, reason=all shards failed]
Elasticsearch exception [type=search_phase_execution_exception, reason=all shards failed]
|
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
229 0
|
应用服务中间件 Android开发
a configuration error occurred during startup. place verify the preference field whth the prompt:TomcatJDK name:
a configuration error occurred during startup. place verify the preference field whth the prompt:TomcatJDK name:
144 0
a configuration error occurred during startup. place verify the preference field whth the prompt:TomcatJDK name: