0
我的數據庫在線是cheapitservice.com。 MySQL的連接器產生的錯誤是這樣的:Mysql .NET連接字符串錯誤
Unable to connect to any of the specified MySQL hosts
而且我的代碼是:
dbConn.ConnectionString = "Server=......hostedresource.com;Database=sampledb;user=user;password=test;"; dbConn.Open();
有什麼錯我的代碼?請幫幫我。
mySQLconnector是版本6.6.5
嘗試'Server = myServerAddress; Database = myDataBase; Uid = myUsername; Pwd = myPassword;'?還要檢查您嘗試連接的IP是否允許連接,以及是否阻止了防火牆。 – bansi
你有TCP連接到你的mysql服務器嗎?嘗試'telnet yourserveraddress 3306'(Windows)或'nc -vv yourserveraddress 3306'(* nix)。 – admdrew
謝謝你回答我會嘗試這些。 :) – user3233787