Force encryption using MySqlConnection

Connection string

This MySQL Connector/Net connection string can be used for connections to MySQL.

Always use SSL. Deny connection if server does not support SSL.

Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
SslMode
=Required;

This option is available from Connector/NET version 6.2.1