---
title: "Google Cloud SQL"
slug: "google-cloud-sql"
description: "Get your data flowing with Dataddo's no-code data integration platform. Connect any source to Google Cloud SQL. Join our community for support and resources!"
updated: 2023-10-31T09:50:21Z
published: 2023-10-31T09:50:21Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dataddo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Cloud SQL

**Google Cloud SQL** is a fully-managed database service. It enables users to set up, maintain, and scale relational databases such as MySQL, PostgreSQL, and SQL Server in the cloud, without the need to manage underlying infrastructure, allowing developers to focus on their applications and data rather than database management tasks.

## Prerequisites

          
          

- You have an access to Google Cloud Console with permissions to provision a SQL Storage.
- You have configured a [Google Cloud SQL](/docs/google-cloud-sql#in-google-cloud-console) instance.
- You have configured the [network access](/docs/google-cloud-sql#network-access) to the instance.

## Authorize Connection to Google Cloud SQL

### In Google Cloud Console

#### Create a Cloud SQL Instance

1. In the Google Cloud Console navigate to **Storage** and **SQL**.
2. Click on **Create Instance** and choose preferred SQL engine and fill in **instance ID**, **master password**, **location** and **database version**.

#### Configure Network Access

1. Click on your instance and on the on the detail page, select **Edit**.
2. Find the **Connections** section and under **Public IP** add all [Dataddo IPs](/docs/network-acl)
3. Click on **Done** to save the changes.

#### Create a Database User

1. Select your instance and go to the **Users** tab.
2. Click on **Create user account** and enter **username** and **password**.

### In Google Cloud Shell

In order run commands on your database, you need to connect to Google Cloud Shell. This can be done by navigating to detail of your SQL instance and clicking on **Open Cloud Shell**.

In the Cloud Shell runn the following command to connect to the database. Make sure to replace **instance**, **username** and **database** with the correct values.

```
gcloud sql connect instance --user=username --database=database
```

### Set User Permissions

Once you [created your user](/docs/google-cloud-sql#in-google-cloud-console) and [connected to Google Cloud Shell](/docs/google-cloud-sql#in-google-cloud-shell), Use SQL commands to grant the following permissions to your user:

- CREATE,
- SELECT,
- UPDATE,
- INSERT,
- DELETE.

#### MySQL

Grant Dataddo the **CREATE, SELECT, UPDATE, INSERT, DELETE** priviledges for your database (please replace database_name with the correct value):

```
GRANT CREATE ON database_name.* TO 'dataddo'@'%';
GRANT INSERT, UPDATE, DELETE ON database_name.* TO 'dataddo'@'%';
FLUSH PRIVILEGES;
```

#### PostgreSQL

Grant Dataddo the **SELECT, UPDATE, INSERT, DELETE** priviledges for your schema (the example assumes that **public schema** is used):

```
GRANT CREATE, USAGE ON SCHEMA public TO dataddo;
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO dataddo;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT, INSERT, UPDATE, DELETE ON TABLES TO dataddo;
```

#### SQL Server

Grant Dataddo the **CREATE, SELECT, UPDATE, INSERT, DELETE** priviledges for your database (please replace database_name with the correct value):

```
USE [database_name];
GO

-- Grant SELECT, INSERT, UPDATE, DELETE permissions
GRANT SELECT, INSERT, UPDATE, DELETE ON schema::dbo TO [dataddo];
GO

-- Grant CREATE TABLE permission
GRANT CREATE TABLE TO [dataddo];
GO
```

## Create a New Google Cloud SQL

1. On the **Destinations** page, click on the [**Create Destination**](https://app.dataddo.com/destinations) button and select the destination from the list.
2. Select your ***authorizer*** from the drop-down menu.
3. Name your ***destination*** and click on **Save**.

          Need to authorize another connection?

          

Click on **Add new Account** in drop-down menu during ***authorizer*** selection and follow the on-screen prompts. You can also go to the **Authorizers** tab and click on [**Add New Service**](https://app.dataddo.com/service/new).

### Create a New Destination Using Supported Database Engines

After setting up the initial configuration in Google Cloud Console, continue with database engine specific configuration:

- [MySQL](/docs/mysql-destination)
- [SQL Server](/docs/universal-sql-server)
- [PostgreSQL](/docs/postgres)

## Create a Flow to Google Cloud SQL

1. Navigate to **Flows** and click on [**Create Flow**](https://app.dataddo.com/flow/new).
2. Click on **Connect Your Data** to add your ***source(s)***.
3. Click on **Connect Your Data Destination** to add the ***destination***.
4. Choose the [write mode](https://docs.dataddo.com/docs/data-storages#write-modes) and fill in the other required information.
5. Check the **Data Preview** to see if your configuration is correct.
6. **Name** your flow and click on **Create Flow** to finish the setup.

---

## Related Articles

- [Data Backfilling to Storages](https://docs.dataddo.com/docs/data-backfilling-to-storages)
- [Write Modes](https://docs.dataddo.com/docs/data-storages#write-modes)
- [Implementation of Batch Ingestion to Data Warehouses](https://docs.dataddo.com/docs/ingestion-to-data-warehouses)
- [Network Access Control List (ACL) Configuration](https://docs.dataddo.com/docs/network-acl)
- [SSH Tunnelling](https://docs.dataddo.com/docs/ssh-tunnelling)
- [Data Transformations](https://docs.dataddo.com/docs/data-transformations)
- [Data Quality Firewall](https://docs.dataddo.com/docs/data-quality-firewall)
