Reputation: 219
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.
Upvotes: 0
Views: 886
Reputation: 497
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.
Upvotes: 1