Skip to main content

Google Cloud SQL Connection

The Google Cloud SQL connection type enables automations to query and write data to managed MySQL, PostgreSQL, or SQL Server instances running on Google Cloud Platform. It is used by the plugin-sql-databases plugin, which delegates to the sql-database-connector.

Connection Type

PropertyValue
Type IDGCLOUD_SQL
CategoryRelational Databases
TestableYes
Entity classDBConnectionDetails

Friendly Example

What you enterExample
Connection nameCloud SQL - Analytics DB
Used forReading approved analytics data for scheduled automation reports
Main details to collectPublic IP (or instance connection name), port, database name, username, and password
Best person to provide itGoogle Cloud or database administrator

After it is saved, workflow builders select Cloud SQL - Analytics DB in a node instead of entering these details again.

Connection Modes

ModeWhen to use
All DetailsProvide the host (public IP), port, database name, username, and password individually. The platform builds the JDBC URL automatically.
JDBC URLPaste a full JDBC connection string directly. Useful when your DBA provides a pre-built URL or when connecting via the Cloud SQL Auth Proxy.
Cloud SQL Auth Proxy

For production workloads, Google recommends using the Cloud SQL Auth Proxy instead of a raw public IP. The proxy handles TLS and IAM-based authentication transparently. When the proxy is running locally on the Qinfinite host, set host to 127.0.0.1 and port to the proxy's local listening port.

Mandatory Fields

FieldWhat It MeansExample
hostPublic IP address of the Cloud SQL instance, or 127.0.0.1 when using the Cloud SQL Auth Proxy. Found in the Google Cloud Console under the instance's Overview tab.34.90.123.45
portTCP port the database engine listens on. Default is 3306 (MySQL), 5432 (PostgreSQL), or 1433 (SQL Server).5432
databaseName of the database to connect toanalytics
usernameDatabase login usernameqinfinite_automation
passwordPassword for the database user. Encrypted at rest.••••••••

JDBC URL Format

MySQL:

jdbc:mysql://34.90.123.45:3306/analytics

PostgreSQL:

jdbc:postgresql://34.90.123.45:5432/analytics

SQL Server:

jdbc:sqlserver://34.90.123.45:1433;databaseName=analytics;encrypt=true

SSL/TLS in the JDBC URL

Cloud SQL can be configured to require SSL. If your instance enforces SSL:

MySQL:

jdbc:mysql://34.90.123.45:3306/analytics?useSSL=true&requireSSL=true&verifyServerCertificate=true

PostgreSQL:

jdbc:postgresql://34.90.123.45:5432/analytics?ssl=true&sslmode=verify-full
note

When connecting through the Cloud SQL Auth Proxy, SSL is already handled by the proxy. You do not need to add SSL parameters to the JDBC URL in that case.

Advanced Fields

FieldWhat It MeansExample
sslModeSSL enforcement level. Options: disabled, preferred, required, verify-ca, verify-full. Use required or verify-full for production.required
connectionTimeoutMaximum time in milliseconds to wait when opening a connection before failing.10000

Setup Instructions

  1. Open the Google Cloud Console and navigate to SQL under the Databases section. Select your Cloud SQL instance and open the Overview tab. Note the Public IP address (or the Instance connection name if you are using the Auth Proxy, formatted as project:region:instance).

  2. Enable public IP access if it is not already enabled. Go to Connections > Networking and add the Qinfinite platform's outbound IP address to the Authorized networks list. If you prefer not to expose a public IP, set up the Cloud SQL Auth Proxy on the Qinfinite host instead.

  3. Create a dedicated database user with the minimum permissions required:

    MySQL:

    CREATE USER 'qinfinite_automation'@'%' IDENTIFIED BY 'strong-password';
    GRANT SELECT, INSERT, UPDATE, DELETE ON analytics.* TO 'qinfinite_automation'@'%';
    FLUSH PRIVILEGES;

    PostgreSQL:

    CREATE USER qinfinite_automation WITH PASSWORD 'strong-password';
    GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO qinfinite_automation;

    Alternatively, create the user from the Cloud Console under Users if you prefer a UI-based approach.

  4. Create the connection in the Global Configurator using the public IP, port, database name, and the credentials from the step above.

  5. Test the connection. Click Test Connection to confirm the credentials and network path are correct before saving.

Troubleshooting

SymptomLikely Cause
Connection refused or Communications link failureThe platform's IP address is not in the Cloud SQL Authorized networks list, or the instance does not have a public IP enabled. Add the IP or set up the Auth Proxy.
Access denied for user '...'@'...'Wrong username or password, or the user account does not permit connections from the platform's IP. Verify the GRANT statement and the host pattern.
SSL connection errorThe instance is set to Require SSL but the JDBC URL does not include SSL parameters. Add the appropriate useSSL or ssl parameters for your engine.
Unknown database / database does not existThe database name in the connection does not exist on the instance. Check the exact name in the Cloud Console under Databases.