Alex Rivera | Logout

Postgresql socket error on OSX 10.7.3 when running Django's syncdb

Asked 2012-02-03T18:48:16.403
14

Since upgrading OSX to version 10.7.3, when I attempt to run a Django "syncdb" command, I receive the following psycopg2 error from Postgresql 8.4.2:

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

I'm able to open psql without incident, but when I attempt to run "pg_ctl status", I receive this error as well:

pg_ctl: could not open PID file "/Library/PostgreSQL/8.4/data/postmaster.pid": Permission denied

Is there a correlation?

Edit
Report

1 Answer

2

You can fix the problem by creating a symlink:

 ln -s /tmp/.s.PGSQL.5432 /var/pgsql_socket/
answered 2012-02-27T16:08:45.283

Your Answer