I'm currently trying to use SSL to connect to a 10.1.26-MariaDB-1 server. but it's throwing this error after I pass the ssl parameters.
I've tried by looking within the PyMySQL docs but it doesn't bring any insights.
this is my code:
import pymysql
conn = pymysql.connect(
host=creds["DB_OP_HOST"],
port=creds["DB_OP_PORT"],
user=creds["DB_OP_USER"],
password=creds["DB_OP_PASSWORD"],
db=creds["DB_OP_DATABASE"],
charset=creds["DB_OP_CHARSET"],
cursorclass=pymysql.cursors.DictCursor,
ssl = {
'key': creds['DB_OP_KEY'],
'cert': creds['DB_OP_CERT'],
'ca': creds['DB_OP_CA'],
}
)
this throws: "[SSL: CA_MD_TOO_WEAK] ca md too weak (_ssl.c:3824)"
there are some post that shows the ssl key like this:
...
ssl = {
'ssl': {
'key': creds['DB_OP_KEY'],
'cert': creds['DB_OP_CERT'],
'ca': creds['DB_OP_CA'],
}
}
but this throws: (2003, "Can't connect to MySQL server on '10.0.16.18' ([SSL: UNSUPPORTED_PROTOCOL] unsupported protocol (_ssl.c:1056))")
python v: 3.7.4
PyMySQL==0.9.3