2013-04-11 90 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