0

Running psql gets me this:

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

I installed Postgres 9.3.3 using Homebrew.

which psql gives /usr/local/bin/psql

This seems to be a common issue. I'm terribly sorry to ask again, but I've gone through at least a dozen Q&As here and can't resolve the issue. A few posts I've gone through include:

Many thanks, Justin

1 Answer 1

0

Have you modified postgresql.conf to accept incoming TCP/IP connections? You should uncomment the listen_addresses parameter and set it to an appropriate subnet mask. Then in pg_hba.conf you have to add a line to enable connections to databases over TCP/IP. Both configuration files are in your data directory (don't know where that is on OSX).

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

2 Comments

Thanks. Could you provide any guidance on how to determine what an appropriate subnet mask would be?
You should look up your network configuration (as you may have noticed, I am not very familiar with OSX so can't help you with the specifics). Your ip address is likely to start with 192.168.0 and then a fourth number; this is typical for automatic network configuration behind a router with DHCP (10.0.0.* is another, less common possibility). There should also be a subnet mask in the form of 255.255.*.*; the third number often also 255, the fourth typically 0. That is your mask. If the numbers are really different, ask your network administrator.

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.