I spend a couple of hours to solve this problem, but have not achieved anything. There are several topics about this problem on the net, but not one of them speaks of an absolute essence to solve this problem.
I just installed postgresql to use it in 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. } }
these are my .py settings 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"?
Anyone have a solution?
source share