我正在尝试连接到在线mysql数据库,但我的代码失败并显示错误:
初始化字符串的格式不符合从索引74开始的规范
我的连接字符串如下所示:
public DBConnect()
{
Initialize();
}
private void Initialize()
{
server = "111.111.111";
database = "base";
uid = "user";
password = "password";
string connectionString;
connectionString = "Server=" + server + ";" + "Database=" + database + ";" + "Uid=" + uid + ";" + "Pwd=" + password + ";";
connection = new MySqlConnection(connectionString);
}