Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

connecting to my cloud sql server with c#

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();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #connecting #cloud #sql #server
ADD COMMENT
Topic
Name
3+1 =