I have a Python script written to connect to a SQL database in Azure, and I am getting the error below:
9002 (28000): SSL connection is required. Please specify SSL options and retry.
Clearly I need to include SSL credentials, but I'm unsure of how to do this given the rest of the formatting of my config file.
I currently have a dictionary with the database access credentials in it formatted as 'key' : 'value'
.
The SSL arguments I've seen seem to go in additional dictionaries or are non-string variables. Anyway, I just need someone to show me...
- how to format it, and
- examples of what they look like (ssl_ca, ssl_cert, and ssl_key)
Here is the dictionary in my config file, with the actual names of things of course changed.
config = {
'user': 'username@database',
'password':'mypassword',
'host':'hostname.database.windows.net',
'database':'databasename'
}
Thanks!