And rename it to mysql. udl; 2. Double-click the mysql. udl file to open "database connection attribute"
Http://blog.csdn.net/zyq5945/article/details/5486393 first you correctly installed MYSQL database Driver (mysql-connector-odbc-5.1.6-win32.msi) 1.create an empty file mysql.txt on the table, rename it mysql. udl; 2. Double-click the mysql. udl file, open "Database Connection Properties"
Http://blog.csdn.net/zyq5945/article/details/5486393
First you have installed the MYSQL database Driver (mysql-connector-odbc-5.1.6-win32.msi) correctly)
1. Create an empty file mysql.txt on the table and rename it mysql. udl;
2. Double-click the mysql. udl file to open the "Database Connection Properties" dialog box. On the "providers" Page, select "Micrsoft Ole DB Provider for ODBC Drivers" and click "Next;
3. On the "connection" Page, select "use connection string" for "specify data source ";
4. Click "compile" to bring up "Select data source", click "new" on the "file data source" page, and select MYSQL Driver "MySQL ODBC 5.1 Driver" for creating a new data source ";
5. Click "Next", click "Browse", write "mysql" to the file name in the "Save as" dialog box, click "Next", and click "finish".
6. In the "MySQL Connnettor/ODBC Data Source Configuration" dialog box, as required (for example );
7. Click "Test" to check whether the connection is successful. The "Connenction successful" prompt box appears. For more detailed settings, click "Details" and click "OK". The setting is complete;
8. Return to the "Database Connection Properties" dialog box and click "test connection". If the connection is successful, it is the connection string we want.
The following is the ADO connection string tested on my local machine, the server localhost, the database meismon, the username root, and the password 123456.
[Xhtml] view plaincopy
Provider = MSDASQL.1; Persist Security Info = True; Extended Properties = "Driver = MySQL ODBC 5.1 Driver; SERVER = localhost; UID = root; PWD = 123456; DATABASE = seismon; PORT = 3306; COLUMN_SIZE_S32 = 1"
Note: Close "Database Connection Properties" and double-click mysql again. open the udl dialog box and click "test connection" because of password loss. You can complete the password in the "Database Connection Properties" dialog box, open mysql in text mode. the udl file is a complete connection string.