DEV Community

Artem Ptushkin
Artem Ptushkin

Posted on

5

How to build jdbc url to Google SQL instance?

I find it pretty tricky and not transparent on how to build JDBC URL to Google SQL Database instance.

Postgresql example placeholder:

jdbc:postgresql:///{database_name}?socketFactory=com.google.cloud.sql.postgres.SocketFactory&cloudSqlInstance={connection_name}:{instance_id}
Enter fullscreen mode Exit fullscreen mode

Alt Text

Alt Text

You can find drivers at github to setup connection

Hope it helps!

Top comments (0)

👋 Kindness is contagious

Dive into this insightful write-up, celebrated within the collaborative DEV Community. Developers at any stage are invited to contribute and elevate our shared skills.

A simple "thank you" can boost someone’s spirits—leave your kudos in the comments!

On DEV, exchanging ideas fuels progress and deepens our connections. If this post helped you, a brief note of thanks goes a long way.

Okay