【问题标题】:Apple MacBook Pro M1 chip + Postgres + Connection refused errorApple MacBook Pro M1 芯片 + Postgres + Connection denied 错误
【发布时间】:2021-02-17 04:40:27
【问题描述】:

我的 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

【问题讨论】:

    标签: postgresql apple-m1


    【解决方案1】:

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

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

    我已将其删除并重新启动 Postgres。现在一切运行良好。

    【讨论】:

    • 删除 postmaster.pid 文件对我有用。我已经删除了 postmaster.pid 这个文件并使用 brew 重新启动了 postgres
    【解决方案2】:

    在我的带有 M1 的 Mac Mini 上,postmaster.pid 在这里: /System/Volumes/data/opt/homebrew/var/postgres

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-12-23
      • 2021-12-04
      • 2022-08-10
      • 1970-01-01
      • 2023-02-17
      • 2021-09-13
      • 2022-01-23
      • 2022-10-18
      相关资源
      最近更新 更多