By tuphan
I have problem when create connection from googlesheet to mySQL here is my google script:
var address = ‘p2sheet-do-user-10258100-0.b.db.ondigitalocean.com’; //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.
Thanks
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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:
https://support.google.com/docs/thread/109432311/failed-to-establish-a-database-connection?hl=en
https://groups.google.com/g/google-apps-script-community/c/gTT5UcnFAVU
I hope this helps!
Regards, Rajkishore
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.