Connect to the MySQL database using the ADO connection string

Source: Internet
Author: User

If you use the MySQL database and use the dbgo (ADO) component to connect through MySQL ODBC 3.5.1 or MySQL connector/ODBC 5.0, then your tadoconnection connection string (connectionstring)

1. when accessing the local database:

'Driver = {MySQL ODBC 3.51 driver}; server = localhost; database = mydatabase; user = myusername; Password = mypassword; option = 3 ;'

2. When connecting to a remote database:

'Driver = {MySQL ODBC 3.51 driver}; server = data.domain.com; Port = 3306; database = mydatabase; user = myusername; Password = mypassword; option = 3 ;'

3. When using ODBC 5.0 to connect to a local database:

'Driver = {MySQL connector/ODBC V5}; server = localhost; database = mydatabase; uid = myusername; Password = mypassword; option = 3 ;'

4. When using ODBC 5.0 remote database:

'Driver = {MySQL connector/ODBC V5}; server = data.domain.com; Port = 3306; database = mydatabase; uid = myusername; Password = mypassword; option = 3 ;'

5. When using ODBC 5.1 to connect to a local database:

'Driver = {MySQL ODBC 5.1 Driver}; server = localhost; database = mydatabase; uid = myusername; Password = mypassword; option = 3 ;'

6. When using ODBC 5.1 remote database:

'Driver = {MySQL ODBC 5.1 Driver}; server = data.domain.com; Port = 3306; database = mydatabase; uid = myusername; Password = mypassword; option = 3 ;'

Note: "data.domain.com" is the database server domain name, "mydatabase" is the database name, "myusername" is the username, and "mypassword" is the password. Please replace it according to your actual situation.

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.