Actually it is not your TZConnection
which speaks with the server. Instead, it communicates with libmysql.dll
which sends and receives data from the Mysql server
.
To secure your connection to the server you can use SSL
. You will need 3 certificates:
- CA-cert.pem
- client-cert.pem
- client-key.pem
You can find information on how to generate them in this MySQL link.
Once you have them you need to setup TZConnection
to indicate SSL
should be used as follows:
Connection.Properties.Values['MYSQL_SSL'] := 'TRUE';
Connection.Properties.Values['MYSQL_SSL_CA'] := 'c:/MyPath/CA-cert.pem';
Connection.Properties.Values['MYSQL_SSL_CERT'] := 'c:/MyPath/client-cert.pem';
Connection.Properties.Values['MYSQL_SSL_KEY'] := 'c:/MyPath/client-key.pem';
More information about MySql and SSL can be found in this discussion in Zeos forums.