Asp.net 运行.net网站而不在系统上安装MySQL ODBC 5.1驱动程序

Asp.net 运行.net网站而不在系统上安装MySQL ODBC 5.1驱动程序,asp.net,mysql,asp.net-mvc,odbc,Asp.net,Mysql,Asp.net Mvc,Odbc,我想运行我的.net网站,而不在系统上安装MySQL ODBC 5.1驱动程序。我已经在bin文件夹中添加了myodbc5 dll,但是在打开连接时,它抛出了一个异常。例外情况如下: "ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified" <connectionStrings><add name="Connection

我想运行我的.net网站,而不在系统上安装MySQL ODBC 5.1驱动程序。我已经在bin文件夹中添加了myodbc5 dll,但是在打开连接时,它抛出了一个异常。例外情况如下:

"ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"
<connectionStrings><add name="ConnectionString" connectionString="Driver={MySQL ODBC 5.1 Driver};Server=localhost;Database=demo;PORT=3306;Uid=root;Pwd=1234;OPTION=3;"/></connectionStrings>
我的连接字符串如下所示:

"ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"
<connectionStrings><add name="ConnectionString" connectionString="Driver={MySQL ODBC 5.1 Driver};Server=localhost;Database=demo;PORT=3306;Uid=root;Pwd=1234;OPTION=3;"/></connectionStrings>

我尝试在连接字符串中添加providerName=“System.Data.Odbc”,但没有成功。我使用的是MySQL 5.6.11版本。 我想运行代码而不在我的系统上安装ODBC驱动程序,但只包括ODBC驱动程序的dll

请帮忙。
提前感谢

这是我在MySQL连接器/NET DLL中使用的。只需添加对MySql.Data的引用

<connectionStrings>
<add name="MySqlConnectionString" connectionString="server=MyServer;User Id=yourusername;password=yourpassword;Persist Security Info=True;database=yourdatabase" providerName="MySql.Data.MySqlClient"/>
</connectionStrings>


如果您的网站需要在启动时连接到MySql数据库,您不能在启动时将我的网站连接到MySql数据库,而是通过内部链接连接它。关于启动基本html显示。后期评论-你解决了这个问题吗?这可能是因为站点(托管?)没有设置“允许32位”选项吗?我已经将其用于其他连接字符串,但我想从ODBC驱动程序进行连接。我已经使用了你上面提到的。