连接到远程服务器

时间:2013-10-31 08:29:03

标签: c# mysql asp.net odbc

我在domainindia.org上有一个Windows服务器。我为mysql创建了一个用户,我正在尝试使用c#中的以下连接字符串连接到MySQL。

 Driver={MySQL ODBC 3.51 Driver};Server=IPaddress;Database=db1;User=user;Password=password; Option=3; 

我无法连接。有人能告诉我这个连接字符串中可能存在什么问题吗? 相同的连接字符串在我的本地工作。

我尝试授予权限,但不允许我执行查询。

任何人都可以告诉我如何连接到我的服务器?

这是我的web.config

<?xml version="1.0"?>
<!--
 For more information on how to configure your ASP.NET application, please visit
 http://go.microsoft.com/fwlink/?LinkId=169433
 -->
<configuration>

<connectionStrings>

<add name="dbConnection" connectionString= "Driver={MySQL ODBC 3.51 Driver};Server=IPadress;Database=db1;User=Myuser;Password=myPassword;Option=3;"/>


  </connectionStrings> 
<system.web>
    <compilation debug="true" targetFramework="4.0"/>
</system.web>
  </configuration>

0 个答案:

没有答案
相关问题