Issue
I am trying to connect my django app to postgres but it gives the following error.
connection to server at "127.0.0.1", port 5432 failed: FATAL: database "testDB" does not exist
the postgres server is running I have checked it also restarted the server still I get the same error
my database settings.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'testDB',
'USER': 'postgres',
'PASSWORD': 'xxxxx',
'HOST': '127.0.0.1',
'PORT': '5432',
}
}
I tried to check if the server is running and it is running, also restarted the server but still the same error.
Solution
database "testDB" does not exist
If you want to connect to database "testDB", it should exist. But it isn't.
Try to create db with name "testDB" by command like, like this,
create database 'testDB';
or in pgadmin.
Answered By - Anton
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.