【Mysql】Docker连接容器中的mysql 8报错 Public Key Retrieval is not allowed

时间:2019-09-25 18:02:01   收藏:0   阅读:415

容器A中的程序连接容器B的mysql,报错Public Key Retrieval is not allowed。

 

解决办法如下:(在连接数据库的链接中加上)

当容器A程序连接容器B数据库时,useSSL=false&allowPublicKeyRetrieval=true

当本地连接容器中mysql时,useSSL=false

 

useSSL=false&allowPublicKeyRetrieval=true is what I needed only

when I tried connecting from docker_container1 to docker_container2_mysql(where mysql is installed) 

within my local host. While from my host machine to docker_container2_mysqluseSSL=false is enough.

https://stackoverflow.com/questions/50379839/connection-java-mysql-public-key-retrieval-is-not-allowed#

原文:https://www.cnblogs.com/AwenDF/p/11585497.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!