1

i am getting this error,,

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"?

What's the problem? I'm using postgresql 9.6 on Ubuntu 17.04 x64

1
  • The problem is that there is no server at the location you are trying to connect to, or that server is not accepting connections due to permissions, business, initialization, and incorrect connection attempt, or... Commented Aug 10, 2017 at 15:37

2 Answers 2

1

Is the postgres deamon running, i.e. what is the output of

pg_lsclusters -h

? If it is not running, you can use

/etc/init.d/postgresql start

to start it.

Sign up to request clarification or add additional context in comments.

Comments

0

First Start the server:

../bin/pg_ctl start

then connect to the database

psql dbname

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.