我在嘗試將我的網站連接到Aruba服務器上的MySql失敗。Web.config aruba ConnectionString
我總是得到這樣的錯誤:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
我使用這個連接字符串現在:
<add name="OfferteConnectionString1" connectionString="Data Source=example.org;User ID=xxxx;password=yyyy" providerName="System.Data.SqlClient"/>
我也試過這樣:
<add name="OfferteConnectionString1" connectionString="Server=example.org;Database=Sql702732_1;Uid=xxxx;Pwd=yyyy;" providerName="System.Data.SqlClient"/>
Daniele,你應該在控制面板中的DB區/頁面中的某處獲取連接字符串。只需將其複製到代碼中即可使用。而且,正如錯誤所述,數據庫是否配置爲允許遠程連接?通常這是在創建數據庫時完成的。最後但並非不那麼重要,如果您多次嘗試訪問數據庫失敗,他們可能已禁止您的IP地址。執行上述檢查並重試。 – FeliceM
問題是我無法在mysql控制面板中找到此部分。我變得瘋了,我不明白> _> – ProtoTyPus
但是,您是否嘗試從託管在其服務器或桌面應用程序上的網站進行連接? – FeliceM