Introduction

In this article, I walk through a small intro about GCP SQL Databases and how to create a PostgreSQL server in GCP SQL

How to create PostgreSQL in GCP SQL

Let’s start with how to create a PostgreSQL Server in GCP SQL
Before starting, log into your GCP Account
To create a PostgreSQL Databases Server→ Click SQL in the Google services Pane
How To Create PostgreSQL Server On Google Cloud Platform SQL Database Service
To Create a SQL Instance → Click CREATE INSTANCE
How To Create PostgreSQL Server On Google Cloud Platform SQL Database Service
Choose which database you want → Click PostgreSQL
How To Create PostgreSQL Server On Google Cloud Platform SQL Database Service
Fill the Configuration Details,
Instance ID: - Give the name for the instance
Set Password
Select the Region nearby you
Select the version of the Database server.
Click the Show Configuration options to configure more details.
How To Create PostgreSQL Server On Google Cloud Platform SQL Database Service
Expand the Configuration details
How To Create PostgreSQL Server On Google Cloud Platform SQL Database Service
Click Connectivity → By default, the instance can’t access from the outside or external networks; to access the instance, allow the particular IP or Public access to the instance. Click + Add a network
How To Create PostgreSQL Server On Google Cloud Platform SQL Database Service
By giving 0.0.0.0/0 in the network it will allow all IPv4 IPs, we can access the instance from anywhere.
How To Create PostgreSQL Server On Google Cloud Platform SQL Database Service
You can see that it was saving.
How To Create PostgreSQL Server On Google Cloud Platform SQL Database Service
To communicate with additional resources and the API → enable Private IP and select Associated network (VPC network which you created or select the default).
How To Create PostgreSQL Server On Google Cloud Platform SQL Database Service
You can see it was saving the details to connect
How To Create PostgreSQL Server On Google Cloud Platform SQL Database Service
You can also check Private connections by clicking VPC 🡪 VPC Peering
How To Create PostgreSQL Server On Google Cloud Platform SQL Database Service
Select Machine type and storage (core and memory)
How To Create PostgreSQL Server On Google Cloud Platform SQL Database Service
If you are going to test and practice the instance select single zone
How To Create PostgreSQL Server On Google Cloud Platform SQL Database Service
If it is a production environment. Select the High availability, it will increase the cost.
How To Create PostgreSQL Server On Google Cloud Platform SQL Database Service
Click to Add the item to add database flags
How To Create PostgreSQL Server On Google Cloud Platform SQL Database Service
Choose any one of the flags, if required.
How To Create PostgreSQL Server On Google Cloud Platform SQL Database Service
.
GCP will update the Database every few months, so GCP offers us to select the day and time to restart your database it will not take more time. So, select the day and time if your database is in production.
How To Create PostgreSQL Server On Google Cloud Platform SQL Database Service
Give the key value to your reference in the labels tab
How To Create PostgreSQL Server On Google Cloud Platform SQL Database Service
Click create to create the database
How To Create PostgreSQL Server On Google Cloud Platform SQL Database Service
GCP creating PostgreSQL server below:
How To Create PostgreSQL Server On Google Cloud Platform SQL Database Service
Success! PostgreSQL server was created successfully.
How To Create PostgreSQL Server On Google Cloud Platform SQL Database Service
You can see the details and overview of the created PostgreSQL.
How To Create PostgreSQL Server On Google Cloud Platform SQL Database Service
By clicking Connections, you can see the connection details, and you can also see the database has been authorized to communicate with GCP App Engine.
How To Create PostgreSQL Server On Google Cloud Platform SQL Database Service
To access the created PostgreSQL server, we can create a user from here.
How To Create PostgreSQL Server On Google Cloud Platform SQL Database Service
You can also create the database from here.
How To Create PostgreSQL Server On Google Cloud Platform SQL Database Service
You can manage backups here.
How To Create PostgreSQL Server On Google Cloud Platform SQL Database Service
Also create a replica for this instance:
How To Create PostgreSQL Server On Google Cloud Platform SQL Database Service
You can also have a look here to see the tasks that have been done:
How To Create PostgreSQL Server On Google Cloud Platform SQL Database Service
I hope you enjoyed this article and that it was useful to you. If you like this article, please like and share.
Thanks for reading, and have a nice day!