错误 2003 (HY000): 无法连接到“IPv4 地址”上的 MySQL 服务器 (10060)

Error 2003 (HY000): can't connect to MySQL server on ' IPv4 address' (10060)

我有一个 Google 云 SQL 实例,我已经使用了一段时间并且从 MySQL Workbench 成功连接。然而,从昨天开始,我无法使用 MySQL Workbench(或笔记本电脑上的命令行)进行连接,并收到错误消息:

ERROR 2003 (HY000): Can't connect to MySQL server on '207.xxx.xxx.xx' (10060)

我已经完成了以下操作:

数据库正常工作,因为我的应用程序可以连接到它并访问数据,我只是无法从我的笔记本电脑获得远程连接。

我对此很陌生,不知道如何解决它。任何帮助将不胜感激。

我没有足够的'points'评论,所以我会在这里发表意见。

我遇到了完全相同的问题。大约 10 天前,我连接到 Cloud SQL 实例,并同步了我的数据库。昨天我打算推送一些更新等。但是我无法连接,即使我没有改变任何关于数据库连接的东西,除了给定的 IPv4。

我认为问题出在我的基于 App Engine 骨架的 Django 项目上,因此我在该项目上创建了一个问题。 https://github.com/GoogleCloudPlatform/appengine-django-skeleton/issues/16

Maybe/Hopefully 一些我们从那里得到一些信息。

感谢大家的帮助。在尝试了您的所有建议后,我找到了一个 Google 组并记录了 issue。 Google已回复如下:

David Newgas: For now try connecting from a GCE instance (including cloud shell) or using a GCE instance to proxy connections from your laptop. I have updated the dashboard with some more information (although it may take a while for you to see it due to caching) To be clear, this issue will only be affecting first generation instances.

我遇到了同样的问题。 纯属幸运,我说“让我们在 gcloud 命令说

时尝试连接我的本地 MySQL 客户端

"Whitelisting your IP for incoming connection for 5 minutes..."

和(mysql 本地客户端)工作。