title: Mac OSX Lion Postgres does not accept connections on /tmp/.s.PGSQL.5432
body: <p>I'm getting a common Mac OSX error for Homebrew installations of Postgres,</p>
  
  <pre><code>No such file or directory
  Is the server running locally and accepting
  connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
  </code></pre>
  
  <p>This is apparently due to there being multiple installs on the system.  However, the usual steps are not resolving things.</p>
  
  <p>I can successfully start Postgres and running:</p>
  
  <pre><code>ps auxw | grep post
  </code></pre>
  
  <p>returns ..</p>
  
  <pre><code>euanmillar       847   0.0  0.0  2432768    588 s000  R+   11:19am   0:00.00 grep postgres
  euanmillar       845   0.0  0.0  2439324    448   ??  Ss   11:19am   0:00.00 postgres:
  stats collector process
  euanmillar       844   0.0  0.0  2443176   1520   ??  Ss   11:19am   0:00.00 postgres:
  autovacuum launcher process
  euanmillar       843   0.0  0.0  2443044    544   ??  Ss   11:19am   0:00.00 postgres: wal writer process
  euanmillar       842   0.0  0.0  2443044    584   ??  Ss   11:19am   0:00.00 postgres: writer process
  euanmillar       841   0.0  0.0  2443044    596   ??  Ss   11:19am   0:00.00 postgres: checkpointer process
  euanmillar       839   0.0  0.0  2443044   3616 s000  S    11:19am   0:00.02 /us
  </code></pre>
  
  <p>so it looks like postgres is running.</p>
  
  <p>I have commented in the following lines in postgresql.conf</p>
  
  <pre><code>port = 5432
  unix_socket_directory = '/var/pgsql_socket'
  unix_socket_permissions = 0777
  </code></pre>
  
  <p>and in var/pgsql_socket/ I do have a hidden file .s.PGSQL.5432</p>
  
  <p>I have tried solutions to many of the posts here. This one especially seems similar:</p>
  
  <p><a href="https://dba.stackexchange.com/questions/21587/postgresql-is-running-locally-but-i-cannot-connect-why">https://dba.stackexchange.com/questions/21587/postgresql-is-running-locally-but-i-cannot-connect-why</a></p>
  
  <p>But the difference is that I do have a '/var/pgsql_socket' directory which is CHOWN-ed to everyone.  I have used Homebrew to completely remove and re-install Postgres and still I have the same issue.</p>