Forum Discussion

oschuhm's avatar
Occasional Visitor
4 months ago

ReadyAPI and Postgres in Google Cloud SQL


unfortunately I was not able to find a related article to this topic.

Can anyone help me which .jars are required and how the jdbc connection string will look like if I want to connect to a Postgres DB in Google Cloud SQL environment?

BR, Oliver

2 Replies

  • nmrao's avatar
    Champion Level 3


    There is should be any difference if the data base is in either local machine or on the google cloud as long as the respective driver files are available under READYAPI_HOME/lib.

    Here is the documentation on installing drivers

    Depending on the Java version, you may get them from Postgresql.

    Please see here

  • Stephen378Baker's avatar
    Occasional Visitor


    Connecting to a PostgreSQL database in Google Cloud SQL involves a few steps. Let’s break it down:

    Required JARs:
    To connect to a PostgreSQL database, you’ll need the appropriate JDBC driver JAR for PostgreSQL. You can download it from the official PostgreSQL website or use Maven/Gradle to manage dependencies.
    The most common JDBC driver for PostgreSQL is postgresql-<version>.jar.
    JDBC Connection String:
    The JDBC connection string for connecting to a PostgreSQL database in Google Cloud SQL depends on whether you want to use a public IP or a private IP.
    Here are the formats for both scenarios:
    Public IP:


    Replace <PUBLIC_IP>, <PORT>, <DATABASE_NAME>, <USERNAME>, and <PASSWORD> with your actual values.
    Private IP (using Cloud SQL Auth Proxy):


    If you’re using a public IP, your connection string might look like:


    For a private IP with Cloud SQL Auth Proxy:


    Remember to replace placeholders with your actual values. Good luck with your PostgreSQL connection in Google Cloud SQL!