JDBC: Apps Script and Google MySQL : Exception: You do not have permission to call Jdbc.getCloudSqlConnection

35 views
Skip to first unread message

Ohyeswhey j

unread,
Apr 16, 2021, 3:50:29 AM4/16/21
to Google Cloud SQL discuss
I get the following error when I attempt to run this function within google sheets: 
Exception: You do not have permission to call Jdbc.getCloudSqlConnection

any idea on how to fix this?
 
var connectionName = 'cosmic-tenure-310821:us-central1:propertydata'; 
var rootPwd = "password"; 
var user = "root"; var userPwd = 'password'; v
ar db = 'propertydata'; v
ar root = 'root'; v
ar instanceUrl = "jdbc:google:mysql://" + connectionName; var dbUrl = instanceUrl + "/" + db; f
unction createTable() 
 var conn = Jdbc.getCloudSqlConnection(dbUrl, user, userPwd); conn.createStatement().execute('CREATE TABLE myProperties(APN INT, APNObject MEDIUMBLOB)'); 
}
Reply all
Reply to author
Forward
0 new messages