My SQL Error: A connection attempt failed because the connected party did not properly respond

…衆ロ難τιáo~ 提交于 2019-12-01 10:26:31

问题


I have a MySQL database in a 3rd party server. I am trying to access it from my local machine using php in dreamweaver. However, I am getting the following error:

MySQL Error #2002:
A connection attempt failed because the connected party did not properly respond 
after a period of time, or established connection failed because connected host 
failed to respond.

I realize I might not have given all the details. I am a beginner and will get the details if required. Thank you.


回答1:


It means you cant connect to the server. Check your connecting to the correct ip address and your firewall is configured to allow traffic.




回答2:


If your using "localhost" also try host name as 127.0.0.1. If its server try from mysql terminal whether that host is connecting from your local machine.

In local machine I have faced same issue with host localhost and changed to 127.0.0.1 then its works well.



来源:https://stackoverflow.com/questions/6818104/my-sql-error-a-connection-attempt-failed-because-the-connected-party-did-not-pr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!