Answer the question
In order to leave comments, you need to log in
What causes a psycopg2.OperationalError when connecting to a PostgreSQL server?
Hello. With PostgreSQL, as well as in principle with the DBMS, I am familiar only in theory. Now I am practicing.
When trying to create a connection by the PostgreSQL database server in the following way
def create_connection():
connection = psycopg2.connect(
dbname='database',
user='postgres',
password='password',
host='localhost',
port='5432'
)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question