I noticed you mentioned that the App Engine app and Cloud SQL instance are 
in the same region, but are they part of the same project?

If they are in the same project, no authorization is needed, otherwise you 
still need to go to 'Access control' -> 'Authorization' -> 'App Engine 
authorization' in the instance details and follow the steps to add the App 
Engine default service account for the App Engine project as an Editor in 
the Cloud SQL instance project.

Even if they're in the same project, you may still have a problem if the 
App Engine default service account is missing from the 'IAM & Admin' 
section of the project. If it was deleted, usually you need to recreate the 
project. However, there's a workaround which you can try 
<https://code.google.com/p/googleappengine/issues/detail?id=13085> to 
recover it in the Cloud Console.

On Friday, November 4, 2016 at 3:40:09 PM UTC-4, Mike Lucente wrote:
>
> I'm getting the following when trying to connect to Cloud SQL from app 
> engine using python:
>
> super(Connection, self).*init*(*args, **kwargs2) OperationalError: (2013, 
> "Lost connection to MySQL server at 'reading initial communication packet', 
> system error: 38")
>
>
> I've posted this on stackoverflow:
>
>
> http://stackoverflow.com/questions/40425349/unable-to-connect-to-cloud-sql-from-app-engine-python
>
>
> No luck so far. My appengine app is a few years old and I'm concerned that 
> google may need to get involved. Unfortunately I'm a bronze customer and 
> have no way to ask for technical support.
>
>
> Thought I'd drop it in here too in case someone has an answer. If I'm 
> unable to resolve I may have set up my database elsewhere.
>
>
> Hoping someone has a solution.
>
>
> Thanks.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/be8645af-80bc-4e31-86c2-cd407ee52cef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to