0

I'm on osx and I have problems creation of user postgresql. when I write the command:

createuser myapp -s

I get the following error:

could not connect to database postgres: 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 do not know if it's just PATH directory problem.

PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting

I installed postgresql with this solution : http://tammersaleh.com/posts/installing-postgresql-for-rails-3-1-on-lion

thanks for your help and sorry for my bad english.

1 Answer 1

1

Are you sure the postgres server is running? (Use "ps ax | grep postgres"). Has it opened a TCP port (per default 5432)? Is this unix socket "/var/pgsql_socket/.s.PGSQL.5432" available and do you have the permissions to read/write it?

Furthermore, you may want to check the pg_hba.conf file where the permissions on the postgres server itself are configured.

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

Comments

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.