okay i bang my head on this some more and i get this error: 2020-03-15 09:01:46 default[20200315t045823] Unhandled rejection Error: ER_BAD_DB_ERROR: Unknown database 'db1'
so i'm still confuse on what i'm doing wrong... and why is this so hard!?!?!?!?! On Wednesday, March 11, 2020 at 11:24:16 AM UTC-4, Emanuel Allen wrote: > > > environment setup logic: two projects one name projectA and another name > projectB. projectA contain the mysql database and projectB contain the app > engine node server. > > what i have tried is setting the right permission within projectB in I Am > with projectA being the sql client > projectA @ appspot.gserviceaccount.com App Engine default service > accountCloud SQL Client > > i also add this to my *app.yaml* file: > > *DB_CONNECTION*: mysql > *DB_HOST*: localhost > *DB_DATABASE*: xxxxxxxxxx > *DB_USERNAME*: xxxxxxx > *DB_PASSWORD*: xxxxxxxx > *DB_SOCKET*: /cloudsql/<project-id>:<region-here>:<db-instance-name> > > *beta_settings:* > # for Cloud SQL, set this value to the Cloud SQL connection name, > *cloud_sql_instances*: <project-id>:<region-here>:<db-instance-name> > > here how i tried connecting in my database javascript file: > > con = mysql.createConnection({ > socketPath: "", > host: "", > user: "", > password: "" > }); > > with trying to switch between socketPath and host. the socketpath being: > > socketPath: `/cloudsql/${process.env.CLOUD_SQL_CONNECTION_NAME}` > > format. > > I tried and struggle with this but refuse to fail, can anyone give me a > solution to this? > > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/11b5268e-2548-498a-a0b9-0d36cbb5a16c%40googlegroups.com.