Hi,
I want to connect to CloudSQL from my Ads Script. I can do this with the generic Jdbc method
Jdbc.getConnection(url, user, password);
but it fails with the recommended method
Jdbc.getCloudSqlConnection(url, user, password);
Failed to establish a database connection. Check connection string, username and password.
I checked them. Several times.
URL for getCloudSqlConnection(): 'jdbc:google:mysql://project:europe-west1:instance/database'
Disadvantages of the generic method are
- Need to put external IP-Address in connection string.
- Need to whitelist Ads Script server IP in Cloud SQL.
IPs may change and break the functionality of my script.
Has anyone succeeded in connecting to Cloud SQL with getCloudSqlConnection() ? Can you tell me what I need to change?
Thanks
Robert