容器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#

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-14
  • 2021-11-12
  • 2021-09-29
猜你喜欢
  • 2022-01-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-27
相关资源
相似解决方案