struggling for the pass couple of weeks to connect google cloud to mysql and app engine using nodejs

63 views
Skip to first unread message

Emanuel Allen

unread,
Mar 21, 2020, 5:50:10 PM3/21/20
to Google App Engine
could you describe or mak a video on how  you got mysql with app engine using nodejs as the server side language to connect? i been struggling for weeks to get it to work and so far no good here what i have done below, i have tried other things like try going the compute engine way but the fact that i can't get the compute engine to have a https is getting in the way. but if i can just get my app engine to connect with mysql using nodejs than i would be good. if you can help.. like using a video to show case how you did it that would be great.

here are screen shoots of doing what was ask of me in this instruction:


Setting up a Cloud SQL instance


no screen shoot of that but i did create it

Find the INSTANCE_CONNECTION_NAME for the instance on the Instance details page. It uses the format PROJECT_ID:REGION:INSTANCE_ID, and is used to identify the Cloud SQL instance you are connecting to.

Screenshot_2020-03-19 db1 Overview - My First Project - Google Cloud Platform.png


Enable the Cloud SQL Admin API, if you haven't already done so:

i click it for both projects

This service account must have the correct IAM permissions to successfully connect. Unless otherwise configured, the default service account is in the format service-PROJECT_NUMBER@gae-api-prod.google.com.iam.gserviceaccount.com

When connecting resources in two different projects, make sure that both projects have enabled the correct IAM roles and have given the service account the correct permissions.

Ensure that the service account for your service has one of the following IAM roles:


Screenshot_2020-03-19 IAM – IAM Admin – My First Project – Google Cloud Platform.png


Screenshot_2020-03-19 Cloud Shell(1).png




and here the error message:

Screenshot_2020-03-19 Cloud Shell.png

i been stuck on this project for weeks and i hate that it's this complicated or even worst it's not complicated at all but it just not conveying to me correctly of what i might be doing wrong. The frustration is real, i never blame a tool for not knowing how to use it correctly but this is making me hate google. you would think i could find a lot of resource on google cloud dealing with  this issues on youtube but i don't and it suck and no other where can i find any help or how to but that same link that i been going over and over. if anyone see what i'm doing wrong or if there is a google emlpoyee that i can give access to my account to show me how to do it. i will high appreciate it. 



David (Cloud Platform Support)

unread,
Mar 23, 2020, 1:11:35 PM3/23/20
to Google App Engine
This error can happen if you deployed an application before enabling the Cloud SQL admin API. I would recommend you to disable/enable the Cloud SQL admin API in both projects then redeploy the application.
Reply all
Reply to author
Forward
0 new messages