Talha Munir 🇵🇸
Posted on August 28, 2023
Follow below tutorial for a quick overview on how to create a cluster and connecting it to a database.
I assumed that you have already made up EDB account follow the link for more information on creating an account in EDB.
Create a cluster:
Creating a cluster
- On the overview page select Create a new cluster
You will be on the Create Cluster Page
- You will find options for your cluster. Select according to your requirements.
Connecting to the new Cluster:
- Select your cluster to get an overview of how it has been configured.
- Select the overview tab and copy the command. Paste in the terminal where psql is installed.
psql -W "postgres://edb_admin@p-qzwv2ns7pj.pg.biganimal.io:5432/edb_admin?sslmode=require"
The above command will prompt for your password and put you on a sql command line.
Creating a new Database:
We will create a new sample database employee
.
Best practice is to isolate data.
- Create a new
employee
database.
create user employee with password 'employee_password';
create database employee;
- Grant the
employee
role to edb_admin:
grant employee to edb_admin
- Connect to the employee database. You will be prompted for edb_admin password(the one you provided above)
\connect employee
References:
💖 💪 🙅 🚩
Talha Munir 🇵🇸
Posted on August 28, 2023
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.