1

I am having difficulty getting the gcloud sql proxy working on my local machine. I have gone through all the steps here however I am getting the following errors. It is unclear to me what is actually going wrong. Important things to note, I am not using a service account, I am authenticating with my own account through gcloud auth login and I am following the TCP sockets steps.

MySQL

ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0

GCloud SQL Proxy

couldn't connect to "<my instance connection name>": googleapi: Error 400: This operation isn"t valid for this instance., invalidOperation

GCloud Logs

...  status: {
   code:  2     
   message:  "UNKNOWN"     
  }
 }
 receiveTimestamp:  "2017-09-08T15:45:10.179994989Z"   
 resource: {…}  
 severity:  "ERROR"   
 timestamp:  "2017-09-08T15:45:04.289Z"   
}
3
  • 2
    Is it a first generation instance? Proxy connectivity only works for Second Generation instances. Commented Sep 8, 2017 at 17:53
  • yes, this is a first generation instance. That is a bummer. Good call, I see that requirement now in the docs, I don't know how I missed it before. Commented Sep 8, 2017 at 18:57
  • If you can make this into an answer I will accept it. Commented Sep 8, 2017 at 23:45

1 Answer 1

1

The most likely reason you are receiving this error message is because you are using a First Generation instance.

Proxy connectivity is only supported for Second Generation instances.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.