Well, I have multiple databases in django project. One is default
and second istest_dev
. i have created docker container. and then everything went well till building the container. after that When I try to call my django app api which is using test_dev
db for reading data. I have encountered:
OperationalError at /api/projects/
(1045, "Access denied for user 'test_dev'@'xxx.xxx.xxx.xxx' (using password: YES)")
In settings file, my databases configuration:
{
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': Path(__file__).resolve().parent.parent / 'db.sqlite3',
},
"test_dev" : {
'ENGINE': 'django.db.backends.mysql',
'NAME': "test",
'USER': 'test_dev',
'PASSWORD': 'db_password',
'HOST': '?=hosted_domain',
'PORT': '3306',
'SSL': True
}
}
If you know any solution. Please help me out of this. Soon I have to put things on production..