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

前端 未结 6 1966
无人共我
无人共我 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:55

    That is not an OS X specific issue. You will need to clean up your postgres installation and then reinstall it again. I have faced this issue on my ubuntu 12.04. While cleaning your previous installation, you will need to remove all packages starting with postgres (postgresql, postgresql-common, postgresql-client etc), in other words, postgres*. I have not used brew, have used port on OS X Lion. I guess the equivalent command should be sudo brew remove postgres*. A sudo brew install postgresql should then do the trick.

    Also, if you feel the server is already running, you can try sudo -u postgres createuser. If that fails, you will need to reinstall.

    However, the output of your ps aux | grep post is actually the grep command itself. Not of the postgres server running.

    EDIT: Looks like the following link could be of help https://dba.stackexchange.com/questions/21587/postgresql-is-running-locally-but-i-cannot-connect-why If yes, then this question might be a duplicate.

提交回复
热议问题