I set the ssl request for my database. I confirmed that I can connect to db via the command line by passing the public key [and confirmed that I can’t connect if I don’t pass the public key]
I get the same error in my django application as when I do not pass the key. It seems that I did not configure the settings.py settings correctly to pass the path to the public key.
What happened to my settings? I am using python-mysqldb.
DATABASES['default'] = {
'ENGINE': 'django.db.backends.mysql',
'HOST': 'my-host-goes-here',
'USER': 'my-user-goes-here',
'NAME': 'my-db-name-goes-here',
'PASSWORD': 'my-db-pass-goes-here',
'OPTIONS': {
'SSL': '/path/to/cert.pem',
}
}
source
share