Not able to connect MySQL Google Cloud Instance Database from NodeJS/Express App Engine.
Able to connect Database locally as I have added my local machine IP in "Authorized networks" of SQL Instance Settings.
Tried using below code in NodeJS App Engine Instance but facing error not able to connect db.
{
"username": "abcd",
"password": "abcd123",
"database": "dummy",
"host": "localhost",
"socketPath": "/cloudsql/{project-name}:{instance-zone}:{instance-name}",
"post": 3306,
"dialect": "mysql",
"dialectOptions": {
"socketPath": "/cloudsql/{project-name}:{instance-zone}:{instance-name}"
}
}
How can I solve this issue?
question from:
https://stackoverflow.com/questions/65540943/not-able-to-connect-google-cloud-mysql-instance-from-app-engine-node-js-standard 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…