I have a mysql server running on AWS which requires to authenticate via SSL (but does not require a user certificate).
What I tried:
Connecting without a cert works fine via SequelPro (GUI):

It also works when using mysqlconnector with an empty ssl param: 'ssl_ca': ''. But unfortunately not with MySQLdb.
I tried (using a connection string)
1.
conn = sqlalchemy.create_engine(
con_str,
connect_args={'ssl':{'ca': ''}})
pd.read_sql_query('select id from mytable limit 1', conn)
2.
conn = sqlalchemy.create_engine(
# the following is used to enforce mysqlconnector usage
con_str.replace("mysql:", "mysql+mysqlconnector:"),
connect_args={'ssl_ca':''})
pd.read_sql_query('select id from mytable limit 1', conn)
The second works fine, the first not. Of course I also tried around with the bare connectors (MySQLdb.connect() and mysql.connector.connect()) and experienced the same behaviour and couldn't bring MySQLdb to work.
Question:
Can you give me some hints on how to use SSL in MySQLdb without a cert (and key)?
Further Background:
We switched to AWS from another provider so unfortunately no more ssh like before and now SSL. And I'm not administrating the DB so I can't make it using user certificates, am only being forced to use ssl without any certs.
A colleague explained that this is okay from a security viewpoint, because the server sends a cert. We trust him that he is the one belonging to the corresponding URL because we trust the CA.