Database - PostgreSQL on AWS
- Create Postgres database on Amazon Web Service.
- Install pgAdmin as client application to connect to database.
- Install SQuirreL SQL Client to connect to database.
I personally prefer to use SQuirreL SQL Client than pgAdmin.
Create Postgres Database on AWS
Reference: Create and Connect to a PostgreSQL Database
- create an AWS account before creating database.
- go to this page: AWS services
- search for
RDS
and click - search for
Create instance
and clickLaunch a DB instance
Below steps made under Free Usage Tier
- Engine:
PostgreSQL
- Use case:
Dev/Test
- DB details:
- tick
Only enable options eligible for RDS Free Usage Tier
- DB instance identifier:
myPostgresDB
- Master username:
xxxxxx
- Master password:
xxxxxx
- tick
- Configure advanced settings
- tick
Yes
for Public accessibility - Database name:
Demo
- tick
Click Launch DB instance
to create.
Use pgAdmin as Client Application
Reference: Connecting to a DB Instance Running the PostgreSQL Database Engine
To connect to database, go to RDS
>Instances
>postgresql
and collect below info:
- Endpoint
- Port
- Username
- Password
- Go to Download - pgAdmin to download
pgAdmin 4 v2.0
- Install and Open pgAdmin
- Right click
Servers
-Create
-Server...
- General:
- Name:
Demo
- Comments:
Demo
- Name:
- Connection:
- Host:
<Endpoint>
- Port:
<Port>
- Username:
<Username>
- Password:
<Password>
- Role: Empty
- Host:
Click Save
Done..
Use Squirrel SQL Client as Client Application
- Install Squirrel SQL Client Application
- Go to SQuirreL SQL Client Download
- Download and install
- Download PostgreSQL JDBC Driver
- Go to PostgreSQL JDBC Download
- Choose
PostgreSQL JDBC 4.2 Driver, 42.1.4
- Get
postgresql-42.1.4 driver
- Add PostgreSQL driver for Squirrel SQL Client
- Open
Squirrel SQL Client
- Choose
Driver
on the left - Choose
+
to add driver - Choose
Extra Class Path
andAdd
- Choose
postgresql-42.1.4 driver
just downloaded. - Fill up:
- PostgreSQL
- jdbc:postgresql://
:<5432>/ - http://jdbc.postgresql.org
- org.postgresql.Driver
- OK
- Open
- Add Alias
- Choose
Aliases
on the left - Choose
+
to add - Choose blue tick
PostgreSQL
as Driver - Fill up:
- Demo
- jdbc:postgresql://postgresql.cfqvncjculpj.ap-southeast-1.rds.amazonaws.com:5432/Demo
- userName
- password
Test
Connect
OK
- Choose
Done..