I have pgAdmin4 and postgresql installed separately on my Mac server. and I have a Spring boot application running in docker container in local
from application, I'm trying to give localhost:5433
in the connection string
jdbc:postgresql://localhost:5433/database1
. However it is not connecting.
error
Could not open JDBC Connection for transaction; nested exception is org.postgresql.util.PSQLException: Connection to 127.0.0.1:5433 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
can someone please help.
Also, I noticed my /usr/local/var/postgres/postgresql.conf
and /Library/PostgreSQL/14/data/postgresql.conf
are also not matching. do we need to have these two in sync?