Cloud SQL Connection
Create a connection for Cloud SQL with below parameters.
Connection Configuration
Configure the fields required to create the connection as explained below.
Connection Name
Name of the connection to be created.
Database Type
Database type (MSSQL, PostgreSQL) to access DB.
Database Name
Database Name to access data.
URL Input Type
Select the URL input type out of: URL Params or Connection URL
For URL Params, provide the Host and SQL Instance Connection Name
Host
Database host or IP.
SQL Instance Connection Name
Provide the fully qualified instance connection name in the format: project:region:instance
For Connection URL, provide the Connection URL
Connection URL
Based on the selected Database Type, provide the Driver URL.
Syntax of URL will be as follows:
For PostgresSQL:
jdbc:postgresql:///<DB name>?cloudSqlInstance=<Full Connection Name>&socketFactory=<SocketFactory class>
For MSSQL:
jdbc:sqlserver://<host>;databaseName=<DB name>;socketFactoryClass=<SocketFactory class>;socketFactoryConstructorArg=<Full Connection Name>
.
Username
Provide database username that has access to the database.
Password
Provide the database user’s password.
Service Account Key
Upload the JSON file having the service account credentials.
Add Configuration: Additional properties can be added using this option as key-value pairs.
After entering all the details, click on the TEST button.
If the connection service identification and authentication details are provided correctly, a success message stating “connection available” is generated.
Click on the CREATE button to save the changes.
If the details are incorrect or the server is down, you will get a message “Connection unavailable”.
If you have any feedback on Gathr documentation, please email us!