Common mysql database connection strings

Source: Internet
Author: User

Common mysql tutorial database tutorial connection string
MyODBC
 
MyODBC 2.50 local database

 

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

 
 

MyODBC 2.50 remote database

 

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

 
 

MyODBC 3.51 local database

 

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

 
 

MyODBC 3.51 remote database

 

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

 
 

Ole db, OleDbConnection (. NET)
 
Standard

 

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

 
 

Connector/Net 1.0 (. NET)
 
Standard

 

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

 
 
The default port is 3306.

Port Number

 

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

 
 

Named Pipe

 

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

 
 
If the port is-1, it indicates that the driver uses the named pipe network protocol to connect to the database.

MySqlConnection (. NET)
 
EInfoDesigns. dbProvider

 

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

 
 

SevenObjects MySqlClient (. NET)
 
Standard

 

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

 
 

Core Labs MySQLDirect (. NET)
 
Standard

 

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)
 
Standard

 

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.