Google Cloud SQL: SQLSTATE[HY000] [2013] Lost connection to MySQL server at 'reading initial communication packet', system error: 0

筅森魡賤 提交于 2019-12-03 04:38:59

问题


I'm desperate since my Google Cloud SQL instance went down. I could connect to it yesterday without problem but since this morning i'm unable to connect to it in any way, it produces the following error: The database server returned this error: SQLSTATE[HY000] [2013] Lost connection to MySQL server at 'reading initial communication packet', system error: 0

This is what I did to try to fix this:

  • restart instance
  • added authorized ip-addresses in CIDR notation
  • reset root password
  • restored backup
  • pinged the ip-address and I get response

All these actions completed but i'm still unable to connect through:

  • PHP
  • MySQL workbench
  • Ubuntu MySQL command line

All without luck. What could I do to repair my Cloud SQL instance. Is anyone else having this problem?


回答1:


I'm from the Cloud SQL team. We are looking into this issue, it should be resolved soon. See https://groups.google.com/forum/#!topic/google-cloud-sql-announce/SwomB2zuRDo. Updates will be posted on that thread (and if there's anything particularly important I'll edit this post).

The problem seems to only affect connections from outside Google Cloud. Clients connecting from App Engine and Compute Engine should work fine.




回答2:


Our company has same problem. We are unable to connect through both MySQL workbench and MySQL command line. Our Google Appengine application has no problems to connect since its not using external IP.




回答3:


there.I encountered the same problem.You need to find out your public ip address,for that type "my public ip" in Google.Now click on your Cloud SQL instance that you created,under that click on ACCESS CONTROL tab and then click on Authorization tab under that.Under Authorized network,give any name you want to the network and copy your public ip address in the network.Now save changes and try to run the command from console.It should work fine.



来源:https://stackoverflow.com/questions/25399510/google-cloud-sql-sqlstatehy000-2013-lost-connection-to-mysql-server-at-rea

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!