如何获得MYSQL5.0.22的连接字符串
展开全部
String mysqlStr = "Database=test;Data Source=127.0.0.1;User Id=root;Password=root;pooling=false;CharSet=utf8;port=3306";
MySqlConnection mysql = new MySqlConnection(mysqlStr);
或者
string MyConString = "DRIVER={MySQL ODBC 3.51 Driver};" +
"SERVER=localhost;" +
"DATABASE=inv;" +
"UID=root;" +
"PASSWORD=root;" +
"OPTION=3";
OdbcConnection MyConnection = newOdbcConnection(MyConString);
MySqlConnection mysql = new MySqlConnection(mysqlStr);
或者
string MyConString = "DRIVER={MySQL ODBC 3.51 Driver};" +
"SERVER=localhost;" +
"DATABASE=inv;" +
"UID=root;" +
"PASSWORD=root;" +
"OPTION=3";
OdbcConnection MyConnection = newOdbcConnection(MyConString);
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询