简体   繁体   中英

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在此处输入图片说明

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

在此处输入图片说明

I got the error from PGAdmin3在此处输入图片说明

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)

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.

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

您还需要在 RDS 控制台的连接和安全选项卡下设置公共可访问性为真。

Read this post.In your security group go to unbound rules and add my ip. and make sure your database is public. https://serverfault.com/questions/656079/unable-to-connect-to-public-postgresql-rds-instance

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM