I am trying to connect to an Apache Age database using Python and getting a “connection refused” error.How can I resolve this?
I have installed Apache Age and Python on my local machine. In my Python script, I'm using the psycopg2 library to connect to the database using the following code:
import psycopg2
conn = psycopg2.connect(
host="localhost",
port=5433,
database="mydatabase",
user="myuser",
password="mypassword"
)
I expected this code to establish a connection to the Apache Age server and allow me to query the database.
Instead, I'm getting a 'connection refused' error message when running the code.