Mac OSX Lion Postgres does not accept connections on /tmp/.s.PGSQL.5432

前端 未结 6 1865
无人共我
无人共我 2021-02-06 04:23

I\'m getting a common Mac OSX error for Homebrew installations of Postgres,

No such file or directory
Is the server running locally and accepting
connections on          


        
6条回答
  •  别跟我提以往
    2021-02-06 04:52

    A simpler solution is to locate where the socket actually is vs where it's expected to be. In my case, I ran:

    $ locate PGSQL.5432
    /private/var/pgsql_socket/.s.PGSQL.5432
    /private/var/pgsql_socket/.s.PGSQL.5432.lock
    

    Then just symlink the expected socket location to the actual socket location.

    $ ln -s /private/var/pgsql_socket/.s.PGSQL.5432 /tmp/.s.PGSQL.5432
    

提交回复
热议问题