作者热门文章
- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我想在我的 Asp.Net 应用程序中使用 MySQL,并且想知道如何使用。我将第一次使用 MySQL。我想知道的最重要的事情是如何连接到 MySQL 数据库。
最佳答案
您可以在 web.config 中使用以下连接字符串连接到 mysql 数据库:
<connectionStrings>
<add name="MySQLConnStr" connectionString="DRIVER={MySQL ODBC 3.51 Driver};Database=YourDatabase;Server=localhost;UID=YourUsername;PWD=YourPassword;"/>
</connectionStrings>
在尝试从 ASP.NET 连接到 MySQL 数据库之前,您需要执行以下操作:
下面就为大家完美讲解ODBC的架构:
有关更多详细信息,请阅读以下引用文章:
Connect to MySQL database from ASP.NET
An ASP.NET Application Using a MySQL Database (Sample Application)
ASP.NET with MySQL - Getting started
希望这对您有所帮助。
关于asp.net - 如何在 asp.net 中使用 mysql?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8515911/
我是一名优秀的程序员,十分优秀!