var csb = new MySqlConnectionStringBuilder
{
Server = "Google Cloud SQL IP address",
UserID = "Your UserName",
Password = "Your Password",
Database = "Your Database/Schema Name",
SslCert = @"C:PathToclient-cert.pem",
SslKey = @"C:PathToclient-key.pem",
SslCa = @"C:PathToserver-ca.pem",
SslMode = MySqlSslMode.VerifyCA,
};
using var connection = new MySqlConnection(csb.ConnectionString);
connection.Open();