Open swadams2 opened 1 week ago
Is the server running ?
Yes.
by default psql will not use TCP try psql -h 127.0.0.1 to see if it will connect to TCP
I tried that and got the same error.
So if you received that error then postgresql is not running on TCP/IP. Make sure the postgresql.conf has listen_address=* or some TCP/IP address
It's set to '*'. Oddly, the "psql -h 127.0.0.1" command works if I don't have the "tcpip = true" line in the configuration file.
It's set to '*'. Oddly, the "psql -h 127.0.0.1" command works if I don't have the "tcpip = true" line in the configuration file.
I'm a bit lost. Which configuration file?
I'm trying to use MS Access with PostgreSQL and so want to configure an ODBC file for this. Testing it resulted in a connection timeout, so I looked at this to troubleshoot: https://odbc.postgresql.org/faq.html#3.3 Adding a "tcpip=true" line to postgresql.conf and a line to permit a connection from the computer running Access to pg_hba.conf and then restarting PostgreSQL seemed to go without errors, but when I tried to run the psql command afterward, I got this error: psql: error: connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused Is the server running on that host and accepting TCP/IP connections?
The psql command worked again after I undid these changes, so I'm trying to figure out how they caused this error. The line I added to pg_hba.conf was as follows. host spiralxprime web_app 192.168.0.72 scram-sha-256
Also, the listen_addresses setting in postgresql.conf was set to '*'.
Any ideas as to why this is happening would be appreciated.