Experience in MySQL connection strings

Source: Internet
Author: User
Tags mysql connection string

The following articles mainly describe the experience in the actual operation steps of MySQL connection strings and provide a detailed explanation of the actual operation steps of MySQL connection strings. The following is the detailed description of the article, I hope you will have a better understanding of it after browsing.

I. MySQL Connector/ODBC 2.50 (MyODBC 2.50) Connection Mode

1. Local Database Connection

 
 
  1. Driver={MySQL};Server=localhost;Option=16834;Database=myDataBase; 

2. Remote Data Connection

 
 
  1. Driver={MySQL};Server=myServerAddress;Option=131072;Stmt=;
    Database=myDataBase; User=myUsername;Password=myPassword; 

3. Special TCP/IP Port connection
Note: The default port of this Driver is 3306. If it is not specified in the MySQL connection string, port 3306 is connected to MySQL.

 
 
  1. Driver={MySQL};Server=myServerAddress;Port=3306;Option=131072;
    Stmt=;Database=myDataBase; User=myUsername;Password=myPassword; 

Ii. MySQL Connector/ODBC 3.51 (MyODBC 3.51) Connection Mode

1. Local Database Connection

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

2. Remote Data Connection

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

3. Special TCP/IP Port connection

Note: The default port of this Driver is 3306. If it is not specified in the MySQL connection string, port 3306 is connected to MySQL.

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

4. Special Character Set connection

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

Iii. ole db, OleDbConnection (. NET) Connection Method

1. Standard connection

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

The above content is an introduction to the MySQL connection string, and I hope you will get something.

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.