0

I just upgraded to Postgres 10.3 via Homebrew. I can't seem to login into my databases through "psql [database name]".

I get the following error:

psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

Also, tried running running a restart through HomeBrew ("brew services restart postgresql") with no issues. Below was the output.

Stopping postgresql... (might take a while)

==> Successfully stopped postgresql (label: homebrew.mxcl.postgresql)

==> Successfully started postgresql (label: homebrew.mxcl.postgresql)

Also ran "ps auxw | grep post" but this didn't yield any output.

thomassantosh
  • 571
  • 1
  • 6
  • 21

2 Answers2

0

Removing the postmaster.pid at the following location /usr/local/var/postgres worked. Also, saw the same answer to the same issue referenced here: Postgres could not connect to server

thomassantosh
  • 571
  • 1
  • 6
  • 21
0

Try rm /usr/local/var/postgres/postmaster.pid

Then brew services restart postgresql