Common MySQL Database connection strings

Source: Internet
Author: User
Tags odbc mysql tutorial port number

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 Databases

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 databases

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 number is 3306.

Specify port number

server=myserveraddress; Port=1234;database=mydatabase; Uid=myusername; Pwd=mypassword;




Named pipes

server=myserveraddress; Port=-1;database=mydatabase; Uid=myusername; Pwd=mypassword;



If the port is-1, it means to tell the driver to use 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.