My environment
macOS Mojave 10.14.6 Homebrew 2.1.11 PostgreSQL 11.5
I typed brew command and checked PostgreSQL server is running.
brew services start postgresql
But I can't connect PostgreSQL server like this command. And it displayed these errors.
psql postgres
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"?
How can I solve this problem?
I've already tried to restart PostgreSQL server
brew services restart postgresql
And also tried this answer, but this file did not exist in the directory.