MySQL 说:无法连接到“127.0.0.1”上的 MySQL 服务器 (4)

MySQL said: Can't connect to MySQL server on '127.0.0.1' (4)

上面的问题在这里几乎没有解决方案,但我找不到任何解决方案所以问。

我安装了 mamp 和 sequel pro。我正在尝试使用 sequel pro 进行连接,但出现此错误。整个错误是

Unable to connect to host 127.0.0.1, or the request timed out.

Be sure that the address is correct and that you have the necessary 
privileges, or try increasing the connection timeout (currently 10 seconds).

MySQL said: Can't connect to MySQL server on '127.0.0.1' (4)

这是我第一次尝试通过标准连接进行连接。

我尝试了套接字连接,但我无法将数据库与我的 nodejs 应用程序连接。谢谢

我在使用 Sequel Pro 时也有同样的经历。
转到 首选项 (Sequel Pro) => 网络 并将超时秒数增加到 30.
那解决了我的问题。