3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Macのローカルで急にPostgreSQLが動かない(psql -lできない)

Posted at

現象

$ psql -l
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"?

posgreに接続できないみたいなエラーだろうが、俺何もしてないぞ。

解決策

とりあえず、エラーの内容をそのままググる。

おーエラーそのまま一緒!!
本当にありがとうございます。助かりました。

で、解決策はpostmaster.pidを消す!

$ rm /usr/local/var/postgres/postmaster.pid

$ psql -l
psql: FATAL:  the database system is starting up # 再起動中

$ psql -l
                                       List of databases
            Name             | Owner | Encoding |   Collate   |    Ctype    | Access privileges
-----------------------------+-------+----------+-------------+-------------+-------------------
 hogehoge                | taku  | UTF8     | ja_JP.UTF-8 | ja_JP.UTF-8 |

めでたしめでたし。

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?