Methods and examples of. NET connection to MySQL database

Source: Internet
Author: User
Tags odbc mysql database

Methods and examples of. NET connection to MySQL database

Method One:

Use MySQL to launch the MySQL connector/net is a ado.net driver for MySQL, below provide the latest version of the download

Http://www.weiqisj.cn/mysql-connector-net-6.0.2.zip

This component is a. NET access component for MySQL to access the MySQL database for ado.net.

After installation completes the component, the namespace MySql.Data.MySqlClient is referenced;

When compiling using the command line: Csc/r:mysql.data.dll Test.cs

Method Two:

Access to the MySQL database through ODBC

Download two components before accessing: ODBC Driver for Odbc.net and MySQL (MySQL connector/odbc (MYODBC) driver) is currently version 3.51

After the installation is complete, you can access the MySQL database via ODBC

Method Three:

Use the MySQL access component launched by Corelab to target. NET

After the installation is complete, reference namespaces: Corelab.mysql;

Compile with command: Csc/r:corelab.mysql.dll Test.cs

Related Article

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.