Reputation: 1349
Admin of a domain created a Google Cloud SQL instance....Now a user of that domain wants to access Google Cloud SQL via google Apps Script, but he is not able to access.... When I run this code from admin account it works :
var conn = Jdbc.getCloudSqlConnection("jdbc:google:rdbms://"+instance_name+"/"+database_name,"root","");
but when i run this code from a domain user then it gives this error :
Failed to establish a database connection. Check connection string, username and password.
Upvotes: 0
Views: 1019
Reputation: 46812
Does that user have access to the database ? see doc here. Or you can also provide userName and password as advanced arguments in parameters
Upvotes: 1