Reputation: 829
I got a python3 script that should connect to a mariadb. I need to encrypt the traffic. When I connect via mariadb-CLI then I succed.
But when i run my script I'll get:
mariadb.OperationalError: SSL connection error: The requested data were not available.
Here is the sript:
#!/usr/bin/env python3
import mariadb
db=mariadb.connect(
host='example.com',
user='boba_fit',
password='I publish all my passwords in stackoverflow',
port=3306,
database='test_db',
ssl_key='/etc/mysql/ssl/mariadb-cert.pem',
ssl_cert='/etc/mysql/ssl/mariadb-key.pem',
ssl_ca='/etc/mysql/ssl/ca-cert.pem'
)
Upvotes: 1
Views: 1113
Reputation: 71
The key and cert parameter are the wrong way around.
It should be: ssl_key= /./.../key.pem ssl_cert= /./.../cert.pem
Upvotes: 1