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”?
$ rm /usr/local/var/postgres/postmaster.pid
$ pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
Note: the path to postgres may be different.