Google Cloud SQL

Configure Google Cloud SQL with Zing

Google Cloud SQL Logo

Google Cloud SQL is a fully managed relational database service for MySQL, PostgreSQL, and SQL Server with rich extension collections, configuration flags, and developer ecosystems. It automatically ensures your databases are reliable, secure, and scalable so that your business continues to run without disruption. Cloud SQL automates all your backups, replication, encryption patches, and capacity increases.

You can connect Zing to your MySQL database from either the Zing web console, the Zing web app, the iOS app, or Android.

Gathering the required information

Hostname

From the Navigation Menu on your Google SQL Cloud Console, click on “Connections”:

Google Cloud SQL Sidebar-Connections

Find the Hostname from the Public IP address under “Networking section”

Google Cloud SQL Hostname

Port

The default port for your database engine type:

  • MySQL: 3306
  • PostgreSQL: 5432
  • Microsoft SQL Server: N.A

Database Name

From the Navigation Menu on your Google SQL Cloud Console, click on “Databases”:

Google Cloud SQL Database

The table lists all the databases hosted on your Cloud SQL instance, identify the name of the database you wish to connect to.

Username

From the Navigation Menu on your Google SQL Cloud Console, click on “Users”:

Google Cloud SQL Users

Identify the name of your user under “User name”

Password

Retrieve the password corresponding to the user identified. Once you enter this, Zing will automatically encrypt this.

Whitelisting Zing Data’s IP on your Cloud SQL Instance

For Zing Data to connect to your Cloud SQL instance, you must authorize Zing’s network on the Cloud SQL console.

From the Navigation Menu on your Google SQL Cloud Console, click on “Connections” and then the “Networking” tab on the page,

Under the “Authorized networks” section, click on “ADD A NETWORK” to whitelist a network for the Cloud SQL instance.

Google Cloud SQL Authorized Networks

Give a name for this network, i.e. “zingdata” and paste Zing’s IP address: 34.75.82.6/32 under “Network*”.

Google Cloud SQL Authorize Network

Scroll down and hit “Save” to update your changes.

Adding the data source on Zing Data

You are now ready to add in your data source on Zing!

Follow these guides on adding a new data source on Zing, based on your database engine:

Connecting via SSL

Downloading your certificates and keys

To connect Zing Data to your Cloud SQL instance via the SSL protocol, you need to download the following authentication documents from Google Cloud:

  • Server Root Certificate
  • Client Certificate
  • Client Private Key

Only the server root certificate is required for Microsoft SQL Server.

You can do so by clicking on “Connections”, then the “Security” tab on the page, and then “CREATE CLIENT CERTIFICATE”:

Google Cloud SQL Create Client Certificate

Create a name for the SSL client and download all of the files or copy the texts on to somewhere secure:

Downloading client credentials

Using your certificates and keys:

On Zing’s adding a data source page, click on “Require SSL” and paste the corresponding text into each text box, removing any trailing whitespace:

Input client credentials on Zing

Zing will verify that it can connect to your data source and if successful, add it as a source. If Zing cannot connect to your data source, you'll see a message asking your to check your credentials and retry. If even after checking your credentials and retrying you still experience issues, reach out to Zing support here