Prerequisites
To enable Coginiti connect to a Google Cloud SQL database using SQL Connector, provide the Application Default Credentials (ADC) file with user or service account credentials. The exact method of sharing an ADC file with Coginiti depends on the type of Coginiti application:
-
Coginiti Pro
The easiest way to set up ADC and share it with Coginiti Pro is to install the gcloud CLI on your computer. For detailed instructions on setting up ADC, see https://cloud.google.com/docs/authentication/provide-credentials-adc. -
Coginiti Team and Coginiti Enterprise
Log into Coginiti Administration Console. Select the Config tab and navigate to the Google Cloud Platform section. Click on Configure Application Default Credentials and upload an ADC file. It is recommended to use ADC with credentials of a service account by using service account impersonation.
Connecting to PostgreSQL using SQL connector
- To add a new connection, navigate to the File top menu and click on Edit Connections (or press [⌘ + O] | [Ctrl + O]), or click the Add icon (➕) next to the Connections header in the Database Explorer panel, and select Postgres - Google Cloud SQL:
- To finish creating a connection, enter valid data in the fields of the New connection dialog
- Connection name – Replace the default New Connection with a meaningful value.
- Database JDBC driver – Specify user drivers for the data source, or click the 'download them' link below this field settings area. For detailed instructions on setting up drivers, see Add a user driver to an existing connection.
- Connection Option – The default value is SQL Connector
- Cloud SQL Instance Name – The URI of the PostgreSQL instance to connect to. The Cloud SQL Instance name format is {project_id}:{region_id}:{instance_id}.
-
Authentication method – You have two options to set up the authentication mechanism:
1. Build-in database authentication uses standard PostgreSQL authentication based on a username and password.
2. IAM authentication uses IAM user or service account to login to PostgreSQL via OAuth 2.0 tokens. - Database - Select the database to connect to.
- Connection timeout (sec) – The default value is 0. Specify another timeout, if needed, to tell the session when to disconnect.
-
Advanced Properties – Supply additional JDBC parameters if needed.
- Click Test to ensure that the connection to the data source is successful.
- Click Save. A newly created connection will be displayed in your Database Explore panel just right under the Connections header.
Connecting to PostgreSQL using Public/Private IP
- To add a new connection, navigate to the File top menu and click on Edit Connections (or press [⌘ + O] | [Ctrl + O]), or click the Add icon (➕) next to the Connections header in the Database Explorer panel, and select Postgres - Google Cloud SQL:
- To finish creating a connection, enter valid data in the fields of the New connection dialog
- Connection name – Replace the default New Connection with a meaningful value.
- Database JDBC driver – Specify user drivers for the data source, or click the 'download them' link below this field settings area. For detailed instructions on setting up drivers, see Add a user driver to an existing connection.
- Connection Option – Select the Public/Private IP option.
- Public/Private IP – The IP address of the PostgreSQL instance to connect to.
- User and Password – Enter your PostgreSQL credentials.
- Database - Select the database to connect to.
- Connection timeout (sec) – The default value is 0. Specify another timeout, if needed, to tell the session when to disconnect.
-
Advanced Properties – Supply additional JDBC parameters if needed.
- Click Test to ensure that the connection to the data source is successful.
- Click Save. A newly created connection will be displayed in your Database Explore panel just right under the Connections header.
Connecting to SQL Server
- To add a new connection, navigate to the File top menu and click on Edit Connections (or press [⌘ + O] | [Ctrl + O]), or click the Add icon (➕) next to the Connections header in the Database Explorer panel, and select Postgres - Google Cloud SQL:
- To finish creating a connection, enter valid data in the fields of the New connection dialog
- Connection name – Replace the default New Connection with a meaningful value.
- Database JDBC driver – Specify user drivers for the data source, or click the 'download them' link below this field settings area. For detailed instructions on setting up drivers, see Add a user driver to an existing connection.
- Connection Option – The default value is SQL Connector. Alternatively, you can select the Public\Private IP option which allows you to specify the IP address and port of SQL Server to connect to.
- Cloud SQL Instance Name – The URI of SQL Server to connect to. The Cloud SQL Instance name format is {project_id}:{region_id}:{instance_id}.
- Encrypt and Trust Server Certificate – These properties allow you to set up TLS encryption and transmit encrypted data over the network.
- Database - Select the database to connect to.
- Connection timeout (sec) – The default value is 0. Specify another timeout, if needed, to tell the session when to disconnect.
-
Advanced Properties – Supply additional JDBC parameters if needed.
- Click Test to ensure that the connection to the data source is successful.
- Click Save. A newly created connection will be displayed in your Database Explore panel just right under the Connections header.
🔎 NOTE: If you need more advanced information on how to set up a Google Cloud SQL connection, please, contact us through support@coginiti.co