Thursday, February 13, 2020

[google-cloud-sql-discuss] Re: ¿How to connect SQL CLoud from App Engine with pymysql on python?

Hello, 

I was able to find documentation that includes the instructions needed to connect to a Cloud SQL (MySQL) instance to App Engine.

Since you already have your Cloud SQL instance set up, you will also need to enable the Cloud SQL Admin API if you haven't already done so.

Both App Engine Standard and Flex use a service account to authorize connections to Cloud SQL, however you will need to give it the appropriate IAM permissions to connect. Additionally, App Engine Flex also supports connecting the Cloud SQL using TCP or a Unix domain.

Lastly, you can refer to this section for sample python code as well as steps on how to connect using TCP or a Unix domain. You may also refer to this GitHub page for a code snippet in the context of a web application.

For future posts, please keep in mind that Google Groups are generally reserved for discussions and opinions about Google products, you may want to refer to Stack Exchange for how-to and technical questions since the answer-question format on those sites will give your question greater visibility. Nonetheless, I hope this information helps point you in the right direction for the moment.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/510d7c0c-acdc-4b0e-962e-bd6b8d7d0e46%40googlegroups.com.

No comments:

Post a Comment