0
votes

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.

1

1 Answers

1
votes

Does that user have access to the database ? see doc here. Or you can also provide userName and password as advanced arguments in parameters