MySQL 2003 错误:无法连接到本地主机(10061),但 PHPMyAdmin 可以工作

发布于 2025-01-01 23:19:52 字数 449 浏览 4 评论 0原文

我试图使用 SQLYog 在本地连接到 WAMPServer 附带的 MySQL 服务器,但它给了我这个错误:

错误号 2003

无法连接到“localhost”上的 MySQL 服务器(10061)

但是,phpmyadmin 工作得很好,并且 mysql_connect() 与 WAMP 的默认登录详细信息一起工作得很好:

主机名:本地主机

用户名:root

密码:

服务器已打开,当 phpmyadmin 工作正常时,为什么我无法使用 root 连接到 SQLYog 上的本地主机?

HeidiSQL 也会发生这种情况。有人有想法吗?谢谢。

I'm trying to connect to the MySQL server that came with WAMPServer locally using SQLYog, but it gives me this error:

Error No. 2003

Can't connect to MySQL server on 'localhost' (10061)

However, phpmyadmin works just fine, and mysql_connect() works fine with the WAMP's default login details:

hostname: localhost

username: root

password: empty

The server's on, why can't I connect to localhost on SQLYog with root, when phpmyadmin works fine?

Happens with HeidiSQL too. Does anyone have an idea? Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

意中人 2025-01-08 23:19:52

我在 HeidiSQL 中遇到了同样的问题,结果是我的 plink 超时太低了。一旦我增加超时,我的问题就解决了!

I had the same issue in HeidiSQL, turned out my plink timeout was too low. As soon as I increased the timeout, my problem was solved!

眼趣 2025-01-08 23:19:52

如果从未首先连接过,则必须使用 plink 连接 mysql 主机
plink -v -L 10085:host:3306 user@host

然后正常配置HeidiSQL

You must use plink connect the mysql host if that is never connected firstly
plink -v -L 10085:host:3306 user@host

And then config HeidiSQL normally

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文