Socket File “/var/pgsql_socket/.s.PGSQL.5432” Missing In Mountain Lion (OS X Server)

后端 未结 20 2171
时光说笑
时光说笑 2020-12-12 09:48

I just upgraded my MacMini Server from Lion Server to Mountain Lion using OS X Server. I am having the same problem with PostgreSQL that I did last year when I first instal

20条回答
  •  渐次进展
    2020-12-12 10:33

    As mentioned by others in the comments, a really simple solution to this issue is to declare the database 'host' within the database configuration. Adding this answer just to make it a little more clear for anyone reading this.

    In a Ruby on Rails app for example, edit /config/database.yml:

    development:
      adapter: postgresql
      encoding: unicode
      database: database_name
      pool: 5
      host: localhost
    

    Note: the last line added to specify the host. Prior to updating to Yosemite I never needed to specify the host in this way.

    Hope this helps someone.

    Cheers

提交回复
热议问题