Quantcast
Channel: 初心者タグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 22058

postgresql PG::ConnectionBad

$
0
0

エラー内容

PG::ConnectionBad (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"?
):

状況

スリープ状態にしていたため、充電が切れてしまいサーバーを立ち上げたが上記のエラーが発生しました。

解決するためにやったこと

postgresql起動させる

$ brew services start postgresql
Error: Unknown command: services

解決した手順

$ brew tap homebrew/services
$ brew services start postgresql
==> Successfully started `postgresql` (label: homebrew.mxcl.postgresql)

エラーは解決できました

参考記事

https://qiita.com/tearoom6/items/1abf24ca6d872e6579b0

https://apple.stackexchange.com/questions/150300/need-help-using-homebrew-services-command

https://make-from-scratch.com/error-connections-on-unix-domain-socket-tmp-s-pgsql-5432/


Viewing all articles
Browse latest Browse all 22058

Trending Articles