MySQL 2003错误:无法连接到localhost(10061),但PHPMyAdmin工作

时间:2022-01-03 03:39:16

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

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

Error No. 2003

错误号2003

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

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

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

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

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?

服务器打开了,为什么我不能用root连接到SQLYog上的localhost,当phpmyadmin工作正常时?

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

也发生在HeidiSQL上。有没有人有想法?谢谢。

2 个解决方案

#1


2  

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!

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

#2


0  

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

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

And then config HeidiSQL normally

然后正常配置HeidiSQL

#1


2  

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!

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

#2


0  

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

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

And then config HeidiSQL normally

然后正常配置HeidiSQL