kubeguide / K8sDefinitiveGuide-V4-Sourcecode

《Kubernetes - The Definitive Guide》 4th Edition Source Code
471 stars 271 forks source link

myweb连接mysql失败 #7

Closed Jacarlianda closed 1 month ago

Jacarlianda commented 4 years ago

1.3.3 myweb-rc.yaml 镜像用的mysql-connector-java-5.1.37.jar,不兼容1.3.2 mysql-rc.yaml默认镜像 mysql 8,导致连接失败,需要将1.3.2 mysql-rc.yaml 指定mysql5.7版本。

wss434631143 commented 4 years ago

我也遇到这个问题了,改成5.7解决。

duncanwang commented 3 years ago

我在有3个公网IP的ECS搭建了集群,也采用了mysql 5.7版本。myweb pod在node2, mysql pod在node1. 只能在node2节点访问web才有效,访问时出现错误,好像是不能识别mysql服务。 Error:com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

kubeguide commented 1 month ago

请使用 mysql 5.7版本测试,谢谢