Thanks for this. The second link is to the flex environment documentation. Are you saying that App Engine standard 2nd gen uses the same method of connecting to CloudSQL instances as flex, i.e. via the unix socket /cloudsql/INSTANCE_CONNECTION_NAME ? If so, it would be helpful to have those instructions/example on the first link (to standard 2nd gen) as well.
Personally, I would like to see an example that doesn't depend on SQLAlchemy + Flask, otherwise people may think they have to use those. I guess it's not hard to figure out but just some acknowledgement that you can set your own environment variables and manually use them to connect with pymysql or whatever adapter. On Tuesday, September 11, 2018 at 11:22:24 PM UTC-4, Olu wrote: > > There are different ways to connect to the CloudSQL instance depending on > the location from where you are connecting. If you are connecting from an > App Engine instance which is located in a project which is different from > the project which the CloudSQL instance resides, you must use a service > account to allow connection between the App Engine application and the > Cloud SQL as described in the link > <https://cloud.google.com/appengine/docs/standard/python3/using-cloud-sql#granting_access_to_gae_name_short> > . > > However, when connecting from your App Engine Application within the same > project, you simply have to configure your app.yaml with the user, > password, database, and instance connection name variables from Cloud SQL, > See the documentation > <https://cloud.google.com/appengine/docs/flexible/python/using-cloud-sql#setting_connection_strings_and_adding_a_library> > . > > External applications have to connect to the Cloud SQL instances directly > through the public IP address and the IP addresses of the connecting > application have to be white listed in the Cloud SQL instance on the > Authorization Tab of the Instance page. > > > -- 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 google-appengine+unsubscr...@googlegroups.com. To post to this group, send email to google-appengine@googlegroups.com. 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/ee4e12f4-14f7-4373-863e-65b9ab34435c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.