Is the server running on host “localhost” (::1) and accepting TCP/IP connections on port 5432?

前端 未结 17 1579
北荒
北荒 2020-12-02 06:37

Before anything, please note that I have found several similar questions on Stack Overflow and articles all over the web, but none of those helped me fix my issue:

17条回答
  •  春和景丽
    2020-12-02 07:40

    Most likely it's because your system shutdown unexpectedly

    Try

    postgres -D /usr/local/var/postgres
    

    You might see

    FATAL:  lock file "postmaster.pid" already exists
    HINT:  Is another postmaster (PID 449) running in data directory "/usr/local/var/postgres"?
    

    Then try

    kill -9 PID
    

    example

    kill -9 419
    

    And it should start postgres normally

提交回复
热议问题