How can I obtain the MYSQL ADO connection string correctly?

Source: Internet
Author: User
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.

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.