I’m trying to connect my Django Project with a RDS instance with Postgre engine
It’s a free tier option
The instance is running normally with no problems
I’ve set my Inbound Rule to allow Postgre connection with my IP
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'angtradingdatabase',
'USER': 'vitor',
'PASSWORD': 'xxxxxx',
'HOST': 'angtradingdatabase.xxxxxxx.us-east-2.rds.amazonaws.com',
'PORT': '5432',
}
}
But I’m receiving this error when I try to run the ‘python manage.py runserver’ code
django.db.utils.OperationalError: connection to server at "angtradingdatabase.cbe1o6n4gvvs.us-east-2.rds.amazonaws.com" (18.117.34.123), port 5432 failed: FATAL: database "angtradingdatabase" does not exist
The name of my database is angtradingdatabase as you can see in the picture, what is causing this problem??
Create new databases
2
Answers
I found the error, for this connection to work you must set the 'Initial database name' as the name of your database and not just the 'DB identifier'
Anyway, tks for your help everyone!
Different from your claim, the database indeed does not exist.
Note that database names are case sensitive.