你可以在你的機器上ping MySQL服務器嗎?你能用任何其他MySQL客戶端從你的機器連接到MySQL嗎?
有時像hosting.co.uk這樣的託管公司把他們的MySQL服務器放在防火牆後面。如果您需要從數據中心之外的某個地方訪問,則可能需要諮詢他們的技術支持。
Max Thorley: How do i ping? is it telnet IP address? I contacts names to allow remote access. I gave them my public facing IP and IPv4 (which i believe is static)??
This what I get with telnet C:\Users\max.thorley>telnet 192.168.35.24 Connecting To 192.168.35.24...Could not open connection to the host, on port 23: Connect failed C:\Users\max.thorley>telnet mysql9.namesco.net Connecting To mysql9.namesco.net...Could not open connection to the host, on por t 23: Connect failed
嘗試telnet mysql9.namesco.net 3306
以查看您是否可以訪問MySQL端口。你可能不能。如果你不能到達它,你會得到一個類似的消息,你與其他telnet
嘗試。這意味着您的託管服務已經阻止了MySQL服務器。如果你能得到它,你會得到一些亂碼,看起來大致是這樣的:
5.5.5-MySQL
%\~)L%q? $p*}X!73:i%wmysql_native_password
你可能無法去它。這是常見的託管服務實踐,因爲它是一個共享服務器,並且對MySQL服務器裝入拒絕服務攻擊並不困難。再次,您需要諮詢您的技術支持。
if its a hosting server you need to log into your cpanel and add your external ip in the allowed ip range to connect the databases. also many hosting have standalone ip for accessing database. as below answer says raise ticket to your hosting support and ask for help – krish KM
如果它是一個託管服務器,你需要登錄到你的cPanel並在允許的IP範圍內添加你的外部IP來連接數據庫。還有許多主機有訪問數據庫的獨立ip。如下面的答案說,提高您的託管支持票,並尋求幫助 – 2014-09-04 12:44:36