0

NOTE: I have a MacOS Monterey M1 chip.

After I put in the command line - psql postgres - I get the response state below.

psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: Connection refused
    Is the server running locally and accepting connections on that socket?

I have done the following already:

  1. Restarting PostgreSQL using homebrew brew services restart postgresql

  2. Re-installing PostgreSQL using Homebrew

brew uninstall postgresql
  1. Updating PostgreSQL using Homebrew
brew install postgresql@14
brew services start postgresql@14
brew link postgresql@14 --force
  • You should check service status and log files. – sami lekesiz Dec 29 '22 at 07:49
  • A) The server is not running. B) The server is running but not listening on port 5432. To your question add the complete `psql` command you are running. – Adrian Klaver Dec 29 '22 at 19:24
  • Or C) the locations given in `unix_socket_directories` do not include '/tmp'. – jjanes Dec 29 '22 at 21:17
  • Does this answer your question? [psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory](https://stackoverflow.com/questions/69754628/psql-error-connection-to-server-on-socket-tmp-s-pgsql-5432-failed-no-such) – MjH Feb 20 '23 at 02:30

0 Answers0