当前位置:数据库 > MySQL >>

常用mysql数据库连接字符串

常用mysql教程数据库教程连接字符串
MyODBC
 
MyODBC 2.50 本地数据库
 
 

Driver={mySQL};Server=localhost;Option=16834;Database=myDataBase;

 
 
 
MyODBC 2.50 远程数据库 
 
 

Driver={mySQL};Server=myServerAddress;Port=3306;Option=131072;Stmt=; Database=myDataBase;Uid=myUsername;Pwd=myPassword;

 
 
 
MyODBC 3.51 本地数据库
 
 

Driver={MySQL ODBC 3.51 Driver};Server=localhost;Database=myDataBase; User=myUsername;Password=myPassword;Option=3;

 
 
 
MyODBC 3.51 远程数据库
 
 

Driver={MySQL ODBC 3.51 Driver};Server=data.domain.com;Port=3306;Database=myDataBase;User=myUsername; Password=myPassword;Option=3;

 
 
 
OLE DB, OleDbConnection (.NET)
 
标准
 
 

Provider=MySQLProv;Data Source=mydb;User Id=myUsername;Password=myPassword;

 
 
 
Connector/Net 1.0 (.NET)
 
标准
 
 

Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;

 
 
默认端口号是3306. 
 
指定端口号
 
 

Server=myServerAddress;Port=1234;Database=myDataBase;Uid=myUsername;Pwd=myPassword;

 
 
 
命名管道
 
 

Server=myServerAddress;Port=-1;Database=myDataBase;Uid=myUsername;Pwd=myPassword;

 
 
如果端口是-1,意思是告诉驱动程序使用命名管道网络协议来连接数据库。
 
MySqlConnection (.NET)
 
eInfoDesigns.dbProvider
 
 

Data Source=myServerAddress;Database=myDataBase;User ID=myUsername;Password=myPassword;Command Logging=false;

 
 
 
SevenObjects MySqlClient (.NET)
 
标准
 
 

Host=myServerAddress;UserName=myUsername;Password=myPassword;Database=myDataBase;

 
 
 
Core Labs MySQLDirect (.NET)
 
标准
 
 

User ID=root;Password=myPassword;Host=localhost;Port=3306;Database=myDataBase; Direct=true;Protocol=TCP;Compress=false;Pooling=true;Min Pool Size=0;Max Pool Size=100;Connection Lifetime=0;

 
 
  
MySQLDriverCS (.NET)
 
标准
 
 

Location=myServerAddress;Data Source=myDataBase;UserID=myUsername;Password=myPassword;Port=3306;Extended Properties="""";
 
 

补充:数据库,mysql教程
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,