2013-04-11 93 views
0

我有一个远程托管提供商的这个Mysql数据库。我安装并使用以下信息MySQL工作台:C#和EF无法连接到远程MySql服务器,但MySql工作台连接

server, 
username, 
pw 

它连接好,不过当我与VisualStudio的尝试我得到这个错误enter image description here

我使用MySQL连接从MySQL的网站。此外,当试图

Server=tango.rdb.superhosting.bg;Database=ulprojec_weatheronmars;Uid=ulpro_georgi_it;Pwd=password; 

我收到以下错误

An error occurred while getting provider information from the database. This can be caused by Entity Framework using an incorrect connection string. Check the inner exceptions for details and ensure that the connection string is correct. 

而且还通过MySQL工作台我可以执行LINQ等

+0

老兄,如果你的屏幕截图是正确的,问题是因为你使用Microsoft SQL Server驱动程序连接到MySql – Icemanind 2013-04-11 21:16:17

回答

1

根据你的EntityFramework与以下连接字符串来连接Visual Studio屏幕截图,您正试图连接Sql Server驱动程序。您应该使用MySql驱动程序。我的猜测是你正在对Entity Framework做同样的事情。

声明:我还没有使用MySql,所以我不知道从哪里得到驱动程序。我相信Google会知道的。

+0

该死的我很笨,我只是忽略了底线是MySql数据库提供程序althogth我安装它。我得睡一会儿; d,谢谢你。 – 2013-04-11 21:17:05

+0

@ georgi-it - 如果这解决了你的问题,不要忘记接受答案。 – 2013-04-11 21:22:17