App overview screenshotSQL and Database Guides
PostgresMySQL
Try our free SQL Client
Tools
Connecting to Postgres
Connecting to drivers
Installing Postgres
Setting up Postgres
Postgres   >   
Setting up Postgres   >   
Postgres on Google Cloud

How to Connect to Postgres on Google Cloud

Login to Google Cloud SQL

Navigate to the Google Cloud SQL console to find your list of instances.

get-ip-address.png

The public IP address, if available, will be your database hostname.

Check Configuration for Postgres

If your instance does not have a public IP address, you will need to check further how to connect to it by clicking on the hamburger menu and selecting Edit.

edit-gcp-db-instance.png

Whitelist your Local Machine to Connect

By expanding the Connections dropdown in the Overview section you can see the network setup of your database. In the example below, this instance has a public IP and any IP address can connect to it. In most setups, you would restrict what IPs can connect to your database.

check-connection-gcp.png

Obtain the Database User

Select the Users tab in the left menu to see what users are available in the Postgres database. The postgres user is the root user.

see-user-gcp.png

Obtain or Change the User Password

When you first created the Postgres instance on Google Cloud, you would have received credentials for the root user or input them yourself. If you do not have them, you can change the credentials by selecting the three dots next to the user you want to change.

change-root-password-gcp.png

Connect to your Postgres database

By now you have obtained the hostname, user, and password for your database and you can use a client like Arctype to connect!

Want to ask for help on databases or SQL? Join our Discord community.