how to connect to a postgres database using psycopg2
hi, trying to figure out how to connect to a postgres database that i've set up in railway using psycopg2.
so far, i have just connected normally using this format: conn = psycopg2.connect(
host = "url",
database = "xyxyxyxy",
user = "yyyyyy",
password = "xxxxx",
port = 13609
)
i have used exactly what they have given me in the railway app but I am getting the error psql: error: connection to server at "......
port 13609 failed: FATAL: password authentication failed for user "......."
connection to server at "url" (35.213.135.65), port 13609 failed: FATAL: password authentication failed for user "....."
do i have to do anything other than this to connect? i am quite sure the password and username and every other variable is correct.
2 Replies
Project ID:
c869a750-ebb9-45e1-a20a-163c245427e3
c869a750-ebb9-45e1-a20a-163c245427e3