Google Cloud SQL

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

  1. 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:

  2. To finish creating a connection, enter valid data in the fields of the New connection dialog
  3. Connection name – Replace the default New Connection with a meaningful value.
  4. 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.
  5. Connection Option – The default value is SQL Connector
  6. 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}.
  7. 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.
  8. Database - Select the database to connect to.
  9. Connection timeout (sec) – The default value is 0. Specify another timeout, if needed, to tell the session when to disconnect.
  10. Advanced Properties – Supply additional JDBC parameters if needed.
  11. Click Test to ensure that the connection to the data source is successful.
  12. 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

  1. 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:

  2. To finish creating a connection, enter valid data in the fields of the New connection dialog
  3. Connection name – Replace the default New Connection with a meaningful value.
  4. 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.
  5. Connection Option – Select the Public/Private IP option.
  6. Public/Private IP – The IP address of the PostgreSQL instance to connect to. 
  7. User and Password – Enter your PostgreSQL credentials. 
  8. Database - Select the database to connect to.
  9. Connection timeout (sec) – The default value is 0. Specify another timeout, if needed, to tell the session when to disconnect.
  10. Advanced Properties – Supply additional JDBC parameters if needed.
  11. Click Test to ensure that the connection to the data source is successful.
  12. Click Save. A newly created connection will be displayed in your Database Explore panel just right under the Connections header.

Connecting to SQL Server 

  1. 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:

  2. To finish creating a connection, enter valid data in the fields of the New connection dialog
  3. Connection name – Replace the default New Connection with a meaningful value.
  4. 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.
  5. 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. 
  6. 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}.
  7. Encrypt and Trust Server Certificate – These properties allow you to set up TLS encryption and transmit encrypted data over the network.
  8. Database - Select the database to connect to.
  9. Connection timeout (sec) – The default value is 0. Specify another timeout, if needed, to tell the session when to disconnect.
  10. Advanced Properties – Supply additional JDBC parameters if needed.
  11. Click Test to ensure that the connection to the data source is successful.
  12. 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

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request