Skip to content
Advertisement

SSL connect to mysql from django

We just had a migration from a “unsecured” mysql DB to a SSL mysql but my Django application cannot connect anymore.

content of settings.py

JavaScript

and when I execute this Django command line : python3 manage.py dbshell (which used to work with the pre-migration DB), I receive the error message :

JavaScript

As you can see, the executed mysql command does not contain anything related to SSL connection.

I tried also to modify the OPTIONS in settings.py with these values :

JavaScript

Still the same output. It does not seem to use the SSL options in any way… Any idea what I should look for ?

Advertisement

Answer

Your “OPTIONS” should probably be inside the “default” connection, now you have two connections “default” and “OPTIONS” instead of having the “OPTIONS” set under the “default” connection. See how it’s done in the possible duplicate Bill linked.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement