Reputation: 674
I am new to AWS and Postgresql. I am trying to connect a AWS RDS db in which I have setup a PostGresql database.
psql -h <name_of_my_instance>.ctmkmqls5kgp.ap-southeast-1.rds.amazonaws.com:5432
psql: could not translate host name <name_of_my_instance>.ctmkmqls5kgp.ap-southeast-1.rds.amazonaws.com:5432 to address: nodename nor servname provided, or not known
I have edited the command and the error message that I got. would be replaced by the actual name of my instance.
Can someone please help me with this error.
Thank you.
Upvotes: 0
Views: 5523
Reputation: 6872
Use -p
option to specify your port number. -h
option is only to specify your host.
Try this way :
psql -p 5432 -h <name_of_my_instance>.ctmkmqls5kgp.ap-southeast-1.rds.amazonaws.com -U <your user name>
Upvotes: 5