标签:
MySQL 连接字符串..
>>ODBC
1.Local database:
"Driver={mySQL};Server=mySrvName;Option=16834;Database=mydatabase;"
2.Remote database:
"Driver={mySQL};Server=data.domain.com;Port=3306;Option=131072;Stmt=;Database=my-database;Uid=username;Pwd=password;"
>>OLE DB, OleDbConnection (.NET)
1.Standard:
"Provider=MySQLProv;Data Source=mydb;User Id=UserName;Password=asdasd;"
>>MySqlConnection (.NET)
eInfoDesigns.dbProvider:
"DataSource=server;Database= mydb;UserID=username;Password=pwd;Command Logging=false"
Declare the MySqlConnection:
C#:
using eInfoDesigns.dbProvider.MySqlClient;
MySqlConnection oMySqlConn = new MySqlConnection();
oMySqlConn.ConnectionString = "my connectionstring";
oMySqlConn.Open();
>>SevenObjects MySqlClient (.NET)
1.Standard:
"Host=server; UserName= myusername;Password=mypassword;Database=mydb;"
>>Core Labs MySQLDirect (.NET)
1.Standard:
"User ID=root; Password=pwd; Host=localhost; Port= 3306;Database=test;Direct=true; Protocol=TCP; Compress=false; Pooling=true; Min Pool Size=0;Max Pool Size=100; Connection Lifetime=0"
标签:
原文地址:http://www.cnblogs.com/lylgg/p/4878267.html