Cannot Connect to Java (Spring Boot) Application via connection strings #154
Replies: 3 comments 5 replies
-
Hi Kikiodazie, did you figure it out? I am considering using PlanetScale with my Spring Boot Restful app instead of a managed Postgres at AWS, and you're the only one (in this discussion) that seems to have tried PS with Spring Boot. |
Beta Was this translation helpful? Give feedback.
-
Apologies for the long wait, @Kikiodazie! I'm not well-versed in Java/Spring, but I've tried reproducing the issue and ran into no issues connecting to PlanetScale with the below code. Generally, any framework or language should work with PlanetScale as long as there's a robust MySQL connector implementation that supports SSL/TLS. Terminal
Code
This is with the mysql-connector-java version Your code snippet looks relatively similar to mine and considering the SSL related error in your stack trace I'm wondering if your host is simply unable to verify the SSL certificate chain. The official documentation for the connector has so much information on that topic that I couldn't possibly repeat it all here, but I can at least link you to it. We also have some more information on secure connections in our knowledge base, though you might have seen this one already. If none of the above has helped, can you perhaps follow the steps under Debugging an SSL connection from the official documentation and report back either here or via https://planetscale.com/support? Cheers! |
Beta Was this translation helpful? Give feedback.
-
spring:
|
Beta Was this translation helpful? Give feedback.
-
Connecting via proxy works perfectly, I am having issues connecting to PlanetScale via connection strings. I have Debugged it for hours, my last attempt was to allow all access to my machine by changing
my.cnf
from bind-address = 127.0.0.1 To bind-address = 0.0.0.0.code:
See full stacktrace below.
Beta Was this translation helpful? Give feedback.
All reactions