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
- Driver={MySQL};Server=localhost;Option=16834;Database=myDataBase;
2. Remote Data Connection
- 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.
- 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
- Driver={MySQL ODBC 3.51 Driver};Server=localhost;
Database=myDataBase; User=myUsername;Password=myPassword;Option=3;
2. Remote Data Connection
- 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.
- 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
- 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
- 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.