Instead hostname , I have used IP-Address, google script still gives "failed to establish a connection, invalid connection string, username or password", I have cross-checked data, and mysql port..everything is ok.. but still problem remains.
function DBWrite(){
var address ='202.47.118.131:3306';
var user = "root";
var pwd="";
var db= "smsbrn";
var cform=FormApp.getActiveForm();
var formId=cform.getId();
var dbUrl='jdbc:mysql://' + address + '/' + db;
***var conn=Jdbc.getConnection(dbUrl, user, pwd);** //connection fails here.*
}
Have you whitelisted the Google IP's on your firewall ?
64.18.0.0 - 64.18.15.255
64.233.160.0 - 64.233.191.255
66.102.0.0 - 66.102.15.255
66.249.80.0 - 66.249.95.255
72.14.192.0 - 72.14.255.255
74.125.0.0 - 74.125.255.255
173.194.0.0 - 173.194.255.255
207.126.144.0 - 207.126.159.255
209.85.128.0 - 209.85.255.255
216.239.32.0 - 216.239.63.255
Also does your MySQL Server allow remote access on that given user or any other user ? You can find how to do so here.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments