0

I installed PostgreSQL(9.0.7) from EnterpriseDB on OS X 10.6. However, when I do a simple

$ psql -U postgres

I get this

psql: 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 am using it with Django. I tried changing the host variable in settings.py to

'HOST': '/tmp'

but I am still getting the same error message when I do a syndb. Any ideas? Thank you.

In my postgresql.conf

listen_addresses = '*'      
port = 5432             
unix_socket_directory = '/var/pgsql_socket/'

Edit: I got it working. For some reason installed the newer version 9.1.3 and that error went away. I also got some help from a cheat sheet for PostgreSQL(http://od-eon.com/blogs/calvin/postgresql-cheat-sheet-beginners/)

1 Answer 1

1

Have you started the database cluster? You should be able to tell by running the command

ps auwwx|grep postg

You should see several postgresql processes. If you do not, you need to start the database server.

http://www.postgresql.org/docs/9.0/static/server-start.html

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

2 Comments

When I tried to start it I got this message The server must be started by the user that owns the data directory.
@Zach: See what OS user owns the data directory and start it as that user. There should be a service script which already does that, if you have rights to run service scripts.

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.