方法1;public DBMySQL(string database,string source,string id,string pwd,bool pooling,string charset,string port) { mylogin = @"Database=" + database + ";Data Source=" + source + ";User Id=" + id + ";Password=" + pwd + ";pooling=" + pooling +";CharSet=" + charset + ";port=" + port + ""; }方法2: public DBMySQL(string database, string source, string id, string pwd,bool pooling, string charset) { mylogin = @"Database=" + database + ";Data Source=" + source + ";User Id=" + id + ";Password=" + pwd + ";pooling=" + pooling +";CharSet=" + charset + ";port=3306"; }方法3: public DBMySQL(string database, string source, string id, string pwd, bool pooling) { mylogin = @"Database=" + database + ";Data Source=" + source + ";User Id=" + id + ";Password=" + pwd + ";pooling=" + pooling + ";CharSet=utf8;port=3306"; }方法4: public DBMySQL(string database, string source, string id, string pwd) { mylogin = @"Database=" + database + ";Data Source=" + source + ";User Id=" + id + ";Password=" + pwd + ";pooling=false;CharSet=utf8;port=3306"; } 完整的连接//public string mylogin = @"Database=xtserver;Data Source=localhost;User Id=root;Password=me24851;pooling=false;CharSet=utf8;port=3306";