ODBC from googlesheet to MySQL

Posted December 4, 2021 146 views
DigitalOcean Managed MySQL Database

I have problem when create connection from googlesheet to mySQL here is my google script:

var address = ‘’; //IP of your external database
var user = 'tts’; // Username for database
var userPwd = 'xxxxxxx’; // Password for user
var db = 'tcndata’; // Database name

//Connect to remote db
var dbUrl = 'jdbc:mysql://’ + address + ’:25060/’ + db;

var conn = Jdbc.getConnection(dbUrl, user, userPwd);

===> ERROR: Exception: Failed to establish a database connection. Check connection string, username and password.

I have added my IP to white list too.


These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hi @tuphan,

Google now requires you to set SSL to false; could you confirm if you have tried using this.

For more details check the below links:

I hope this helps!