i spend couple of hours to solve these problem but did not reach anything. There are several topics about this problem on the net but none of them says an absolute thing to solve this.
I just installed postgresql in order to use it on my django project.
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql_psycopg2", # Add "postgresql_psycopg2", "postgresql", "mysql", "sqlite3" or "oracle".
"NAME": "name", # Or path to database file if using sqlite3.
"USER": "postgres", # Not used with sqlite3.
"PASSWORD": "pass", # Not used with sqlite3.
"HOST": "", # Set to empty string for localhost. Not used with sqlite3.
"PORT": "", # Set to empty string for default. Not used with sqlite3.
}
}
this is my settings.py and the error is that
could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
Did anyone have a solution about it ?
/var/run/postgresql/.s.PGSQL.5432
or/tmp/.s.PGSQL.5432
or in some other place. Are you able to connect usingpsql
. For a couple of hours of work you don't provide much information to work on. – Tometzky May 31 '12 at 8:20