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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-appengine/a0c42ca4-cf03-4c63-a7ce-68e02e7bca87%40googlegroups.com.