Reputation: 149
I am unable to connect to the PostgreSQL database through psycopg2 for some reason
here is my connection configuration:
conn = psycopg2.connect(
user = "postgres",
password = "xxxxxx",
host = "xxxx.us-east-1.rds.amazonaws.com",
database = "current2",
port = 5432
)
I put sensitive information in x's, but ignoring that, what exactly am I doing wrong?
Upvotes: 3
Views: 8325
Reputation: 247665
That is an error with your domain name resolution (DNS) setup and has nothing to do with the database. The DNS server you have configured on your system cannot resolve the host name.
Either use a different DNS server, or use the database server's IP address.
Upvotes: 2