connection string example c#

Example 1: connect to mysql c# connection string C#

Server=myServerAddress;Port=1234;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
Server=serverAddress1, serverAddress2, serverAddress3;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;Encrypt=true;

Example 2: get connection string from web.config in c#

get connection string