In the above example, the username, password and all other data will be sent in clear text.
Here are two related questions of Python MySQLDB SSL Connection , CA SSL SSL option for Python MySQLdb does not work, but does the key do?
If you have access to configure, configure the MySQL server, we can help configure SSL.
MySQL supports encrypted connections. The MySQL server you are connecting to must be configured to use SSL, and the client must add an SSL parameter when connecting.
Using SSL Connections
shell> mysql --ssl-ca=ca-cert.pem ...
You can check if a server that supports SSL is connected by adding --ssl-ca=ca-cert.pem . ca-cert.pem: use this as an argument - ssl-ca on the server and client side. (The CA certificate, if used, must be the same on both sides.)
The MySQL SSL example describes the process of configuring MySQL for and connecting to SSL.
source share