My SQL 错误:连接尝试失败,因为连接方未正确响应
我在第三方服务器中有一个 MySQL 数据库。我正在尝试使用 Dreamweaver 中的 PHP 从本地计算机访问它。但是,我收到以下错误:
MySQL 错误#2002: 连接尝试失败,因为连接方未正确响应 一段时间后,或建立连接失败,因为连接的主机 未能回复。
谢谢。
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.
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这意味着您无法连接到服务器。检查您连接到的 IP 地址是否正确,并且您的防火墙已配置为允许流量。
It means you can't connect to the server. Check your connecting to the correct IP address and your firewall is configured to allow traffic.
如果您使用“localhost”,也尝试将主机名设置为 127.0.0.1。如果其服务器从 mysql 终端尝试该主机是否从您的本地计算机连接。
在本地计算机上,我遇到了与主机 localhost 相同的问题,并将其更改为 127.0.0.1,然后它运行良好。
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.