error with postgresql datababse : Is the server running locally and accepting connections on Unix domain socket “/var/run/postgresql/.s.PGSQL.5432”?

后端 未结 8 805
执笔经年
执笔经年 2021-02-05 17:09

When I run the rake db:migrate or run the rails s command, I get the same error:

Error : could not connect to server: 
No such file or         


        
8条回答
  •  爱一瞬间的悲伤
    2021-02-05 17:49

    I solved It . I Just created a softlink using :

    sudo ln -s /tmp/.s.PGSQL.5432 /var/run/postgresql/.s.PGSQL.5432

    and then edited the

    /etc/postgresql/9.4/main/pg_hba.conf

    ( If you have another version of postgresql you have to change 9.4 in the path)

    From:

    local all postgres peer

    To:

    local all postgres md5

提交回复
热议问题