I'm trying to access my Cloud SQL instance from my App Engine flexible environment NodeJS application but kept getting timeout issues.
When I add the IP of the compute engine running the App engine to the Cloud SQL Access Control it works. The documentation states that access should be granted automatically if both are in the same project.
What am I missing?
I'm using the following connection settings for knex:
const config = {
host: 'myIP',
user: 'user',
password: 'password',
database: 'database',
port: 3306
};
The socket settings aren't working either. throwing a "Unhandled rejection Error: connect ENOENT /cloudsql" exception:
const config = {
socketPath: '/cloudsql/project:zone:instance',
user: 'user',
password: 'password',
database: 'database'
};