Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PGAdmin III cannot connect AWS RDS

I am trying to connect AWS RDS PostgreSql from PgAdmin 3. I followed the below link http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ConnectToPostgreSQLInstance.html

In Security Group, I also added PostgreSQL and All traffic as below enter image description here

The "publicly accessible" flag was enabled (updated after Mark B's comment)

enter image description here

I got the error from PGAdmin3 enter image description here

Very appreciate for any suggestion

******UPDATE*******

I can connect pgAdminIII to AWS RDS successfully using home wifi, but cannot connect using office wifi.

My concern is:

Was the port 5432 blocked by office wifi?

How can I configure/update the port without impacting to current API? Note: My current API is working well (CRUD)

like image 813
franco phong Avatar asked Feb 22 '17 16:02

franco phong


3 Answers

Can you can test your connection to a DB instance using common Linux or Windows tools first?

From a Linux or Unix terminal, you can test the connection by typing the following (replace with the endpoint and with the port of your DB instance):

$nc -zv DB-instance-endpoint port

For example, the following shows a sample command and the return value:

$nc -zv postgresql1.c6c8mn7tsdgv0.us-west-2.rds.amazonaws.com 8299

Connection to postgresql1.c6c8mn7tsdgv0.us-west-2.rds.amazonaws.com 8299 port [tcp/vvr-data] succeeded!

Windows users can use Telnet to test the connection to a DB instance. Note that Telnet actions are not supported other than for testing the connection. If a connection is successful, the action returns no message. If a connection is not successful, you receive an error message such as the following:

C:>telnet sg-postgresql1.c6c8mntzhgv0.us-west-2.rds.amazonaws.com 8299

Connecting To sg-postgresql1.c6c8mntzhgv0.us-west-2.rds.amazonaws.com...Could not open connection to the host, on port 819: Connect failed

If Telnet actions return success, then you are good to go.

like image 130
Murtuza Z Avatar answered Oct 10 '22 22:10

Murtuza Z


If you are trying to access it from a network which is not listed for that port. you need to add inbound rules for those network IPs from AMAZON RDS system

like image 35
Vikas Thombre Avatar answered Oct 10 '22 21:10

Vikas Thombre


You will also need to set Public accessibility true under Connect & security tab in RDS console.

like image 30
Half_Duplex Avatar answered Oct 10 '22 22:10

Half_Duplex