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

Community
  • 1
  • 1
JustinTBrown
  • 157
  • 1
  • 10

1 Answers1

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).

Patrick
  • 29,357
  • 6
  • 62
  • 90
  • Thanks. Could you provide any guidance on how to determine what an appropriate subnet mask would be? – JustinTBrown Mar 19 '14 at 18:26
  • 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. – Patrick Mar 20 '14 at 01:18