1. Download the ODBC database driver (Mysql-connector-odbc-5.3.4-win32.msi or mysql-connector-odbc-5.3.4-winx64.msi) that installs MySQL:/http dev.mysql.com/downloads/connector/odbc/
2. Create a new empty text file on the desktop mysql.txt, rename it to Mysql.udl;
3. Double-click the Mysql.udl file to open the Database Connection Properties dialog box, select Micrsoft Ole DB Provider for ODBC Drivers on the Providers page, and click Next.
4. On the "Connections" page, "Specify Data Source" Select "Use connection string";
5. Click "Compile", pop "select Data Source", click "New" in the "File Data Source" page, select the MySQL driver "MySQL ODBC 5.3 Unicode Driver" When creating a new data source.
6. Click "Next", click "Browse", in the "Save as" dialog box file name to write "MySQL", click "Next", click "Done";
7. In the MySQL connnettor/odbc Data Source Configuration dialog box, press demand
8. Click "Test" to see if the connection is successful, the connection will have a "connenction successful" prompt box, need more detailed settings click "Details", click "OK", set to complete;
9. Return to the "Database Connection Properties" dialog, click "Test Connection", the successful word is the connection string we want
10. Opening the mysql.udl file in text mode is the complete connection string.
PROVIDER=MSDASQL.1; Persist Security Info=false; Extended properties= "Driver=mysql ODBC 5.3 Unicode Driver; server=127.0.0.1; Uid=root; Pwd=123456;database=test; port=3306 "
Note: After you close the database connection properties, double-click mysql.udl to open the dialog box, because the password is missing, click "Test Connection" will not connect, the "Database Connection Properties" dialog box to complete the password and so on.
How to get the ADO connection string for MySQL correctly