# Connecting to Google Cloud SQL in Astera

Google Cloud SQL is a fully managed database service that makes it easy to set-up, maintain, and manage MySQL and PostgreSQL relational databases in the cloud.

There are three types of databases supported in Google Cloud.

1. MySQL
2. PostgreSQL
3. SQL Server

All of them can be connected to by following the same steps in Astera:

### Steps to Connect to Google Cloud SQL via Astera

Follow the steps below to connect to Google Cloud SQL via Astera:

1. Create an instance in the GCP Console. Once this is done, the following screen will appear.

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FBg56iT8aEWg4kO7X2q13%2F1.png?alt=media\&token=0582d567-e2d6-4fc9-8ae0-61cdfe3ff243)

2. Go to the *CONNECTIONS* tab and click *Add network*. You will have to enter the public IP of your system from where you want to access databases. This will enable you to access the databases hosted on GCP.

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FJBxwWK5TFfmEXacBMjvp%2F2.png?alt=media\&token=e5d9807c-26e7-45bf-8674-59e69605c4eb)

3. In the *USERS* tab, *Create user account* if you do not have one already.

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FSkoBJQu0eoGPakrBCns7%2F3.png?alt=media\&token=1df7353c-ddbb-4415-ad4c-3cdd1aa1dcf7)

4. Now, in Astera,

* Select the relevant *Data Provider* (MySQL or PostgreSQL).
* Provide the *User ID* and *Password* that you created in the step 3.
* Provide the *Public IP address* in the *Server* Name as shown in the screenshot below:

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2F77tJ7sGT1fM4mlH5HYHp%2F4.png?alt=media\&token=5292df68-ae8f-43cb-9c1f-08ca7d8550f1)

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FHbXEbwrtIeXuYPEJuRTE%2F5.png?alt=media\&token=dc010425-bcee-4d50-bd76-1120b71b2a24)

Now, click *Test Connection* to see if your connection has been established with the database. When the connection is established, click *Next*. You can now pick a table from your database and use it in your dataflow.

This concludes connecting to Google Cloud SQL via Astera.
