Google Cloud SQL: SQLSTATE [HY000] [2013] Lost connection to MySQL server while "reading source communication packet", system error: 0

I despaired as my Google Cloud SQL instance went down. I could connect to it yesterday without any problems, but in the morning I can’t connect to it anyway, it produces the following error message: The database server returns an error message: SQLSTATE [HY000] [2013] Lost connection MySQL server when "reading source communication packet", system error: 0

Here is what I did to fix this:

  • reboot instance
  • Authorized IP addresses added in CIDR notation
  • reset root password
  • restored backup
  • pinged ip-address and I get a response

All of these steps are complete, but I still cannot connect through:

  • Php
  • Workbench mysql
  • Ubuntu MySQL command line

All without luck. What can I do to restore an instance of Cloud SQL. Does anyone else have this problem?

+5
source share
3 answers

I am from the Cloud SQL team. We are studying this problem, it must be resolved in the near future. See https://groups.google.com/forum/#!topic/google-cloud-sql-announce/SwomB2zuRDo . Updates will be published in this thread (and if there is anything particularly important, I will edit this post).

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

+3
source

Our company has the same problem. We cannot connect via MySQL workbench and MySQL command line. Our Google Appengine app has no connectivity issues because it does not use an external IP address.

0
source

there. I ran into the same problem. You need to find out your public IP address for this type of β€œmy public ip” on Google. Now click on your Cloud SQL instance that you created, under this click on the ACCESS CONTROL tab and then go to the "Authorization" tab in the "Authorization" section, specify any name you want on the network, and copy the public IP address to network. Now save the changes and try to run the command from the console. This should work fine.

0
source

Source: https://habr.com/ru/post/1200728/


All Articles