Apple MacBook Pro M1 芯片 + Postgres + Connection denied 错误

时间:2021-02-17 04:40:27

标签: postgresql apple-m1

我的 MacBook Pro M1 芯片出现以下错误

Is the server running on host "localhost" (::1) and accepting
    TCP/IP connections on port 5432?
could not connect to server: Connection refused
    Is the server running on host "localhost" (127.0.0.1) and accepting
    TCP/IP connections on port 5432?

在 MacBook Air 中,我曾经通过从 /usr/local/var/postgres/postmaster.pid 目录中删除 postmater.pid 来解决此错误。

但无法在 MacBook Pro M1 BigSur OS 中找到此 pid

1 个答案:

答案 0 :(得分:1)

在 MacBook Pro M1 芯片中,您可以在下面的目录中找到 postmater.pid。

/System/Volumes/Update/mnt1/opt/homebrew/var/postgres/postmaster.pid

我已经删除了它并重新启动了 Postgres。现在一切正常。