Connect Google Cloud SQL with Serverless VPC access issue

139 Views Asked by At

I have Google App Engine project and when I try to connect to Google Cloud SQL through Serverless VPC access I got such error

ConnectionError: Failed to connect to 11.11.111.1:1433 - unable to verify the first certificate

If you have any suggestion that would be great

Here is the code:

const createPool = async () => {
  const config = {pool: {}};
  config.user = process.env.DB_USER; // e.g. 'my-db-user'
  config.password = process.env.DB_PASS; // e.g. 'my-db-password'
  config.database = process.env.DB_NAME; // e.g. 'my-database'
  config.server = process.env.DB_PUBLIC_IP;
  config.port = 1433;

  config.connectionTimeout = 60000;
  config.pool.acquireTimeoutMillis = 30000;
  config.pool.min = 1;
  config.pool.createRetryIntervalMillis = 200;

  return await mssql.connect(config);
};
0

There are 0 best solutions below