how to use mysql with asp.net?

前端 未结 3 617
一个人的身影
一个人的身影 2021-01-14 07:12

I want to use MySQL with my Asp.Net application and would like to know how. I am going to use MySQL for the first time. The most important thing I would like to know is how

3条回答
  •  一向
    一向 (楼主)
    2021-01-14 08:07

    You can use the following connectionstring in your web.config to connect to mysql database:

    
      
    
    

    You need to do the following before attempting to connect from ASP.NET to MySQL database:

    1. Make sure you have installed the .Net Framework on your server
    2. Download the ODBC .Net data provider and install it on your development machine or your server. You can download it here: http://www.microsoft.com/downloads/details.aspx?FamilyID=6ccd8427-1017-4f33-a062-d165078e32b1&DisplayLang=en
    3. install MySQL ODBC Driver-MyODBC 3.51. You can download it here: http://dev.mysql.com/downloads/connector/odbc/3.51.html

    The following will perfectly explain to you the architecture of ODBC: ODBC

    And for more details go through following referenced articles:

    Connect to MySQL database from ASP.NET

    An ASP.NET Application Using a MySQL Database (Sample Application)

    ASP.NET with MySQL - Getting started

    Connector/NET Examples

    Hope this helps.

提交回复
热议问题