0

当我在终端中键入“psql”时,或者当我尝试使用 Postgres.app 连接到服务器时,我得到

"/Applications/Postgres.app/Contents/Versions/9.6/bin/psql" -p5432 -d "postgres"
psql: could not connect to server: No such file or directory".
Is the server running locally and accepting
connections on Unix domain socket "/Users/Dimitar/postgres/.s.PGSQL.5432"?

但是,当我输入“psql -p 5432 -h localhost”时,我成功连接。有人可以告诉我为什么会这样。我在网上到处都看过,大多数有类似问题的人都无法让“psql -p 5432 -h localhost”像我一样工作。

以下是显示的流程,包括“发布”一词

图片

4

0 回答 0