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: https://cloud.google.com/sql/docs/mysql/connect-app-engine?hl=en_US 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. [image: 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 <https://cloud.google.com/iam/docs/understanding-roles#cloud-sql-roles>: [image: Screenshot_2020-03-19 IAM – IAM Admin – My First Project – Google Cloud Platform.png] [image: Screenshot_2020-03-19 Cloud Shell(1).png] and here the error message: [image: 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. On Friday, July 19, 2019 at 10:28:50 AM UTC-4, Mahesh Jayashankar wrote: > > I have been working on App Engine and Cloud SQL for sometime now. > > > Recently I have *disabled public access on my DB*. Since then I am unable > to connect to CloudSQL using my App Engine(Both App Engine and Cloud SQL > are in same Google Cloud Project). > > The only way I am able to connect is when I add the App Engine IP on > CloudSQL Connections Tab. But on a new deployment the IP changes, hence > adding static IP is not an ideal answer for this. > > In Cloud SQL connections tab it says the following : > > *App Engine authorization* > > *All apps in this project are authorized by default. To authorize apps in > other projects, follow the steps below.* > > *Apps in this project: All authorized.* Which is not true in this case. > > *Cloud SQL API and Cloud SQL Admin API are enabled.* > > > connection = mysql.createConnection({ > host : 'INSTANCE_CONNECTION_NAME', > user : 'db_user', > password : 'db_password', > database : 'db_name' > }); > > > My *app.yaml* looks like below: > > > > env_variables: > SQL_USER: USER_NAME > SQL_PASSWORD: PASSWORD > SQL_DATABASE: DB_NAME > INSTANCE_CONNECTION_NAME: INSTANCE_CONNECTION_NAME > # [END env] > > # [START cloudsql_settings] > beta_settings: > # The connection name of your instance, available by using > # 'gcloud beta sql instances describe [INSTANCE_NAME]' or from > # the Instance details page in the Google Cloud Platform Console. > cloud_sql_instances: INSTANCE_CONNECTION_NAME=tcp:3306 > # [END cloudsql_settings] > > > > > *Expected:* Get a Connection. > *Actual:* getaddrinfo ENOTFOUND INSTANCE_CONNECTION_NAME > INSTANCE_CONNECTION_NAME:3306 > > Not sure why it's taking INSTANCE_CONNECTION_NAME twice. > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/e4352110-3be0-47ef-8f14-3f9fe13ac626%40googlegroups.com.
