5
3

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.

psql: could not connect to server: No such file or directory

Last updated at Posted at 2018-08-29

postgreSQLをインストールし、初のコマンドである
psqlを入力したら即刻エラーがでた。

psql: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

これはどうやらサーバーで起動をしないといけないようだ。

ここを参考に
https://www.turbolinux.co.jp/products/server/11s/user_guide/posgrestart.html

このコマンドを入力して起動

/etc/init.d/postgresql start

これで正常にコマンドの結果が帰ってきた。

postgres@cdf97162355a:~$ psql
psql (9.6.10)
Type "help" for help.

postgres=#
5
3
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
5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?