PostgreSQLのアップグレードで起動失敗
HomebrewでインストールしたPostgreSQL。 アップデートしたらサービスとして起動はするんだけど psql打つとエラーが出てDBに接続できない。
課題
$ psql postgres
$ psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
環境が悪いのか、何が悪いのかが分かってないが
対応策として以下でなんとかはなった。
注意)fixBrewLionPostgresql.sh がいま無さそう…
解決策
$ cd /usr/local/Cellar/postgresql $ curl -o fixBrewLionPostgresql.sh http://nextmarvel.net/blog/downloads/fixBrewLionPostgres.sh $ chmod 777 fixBrewLionPostgresql.sh $ ./fixBrewLionPostgresql.sh $ pg_ctl -D /usr/local/var/postgres start
参考サイト