There seems to be an issue with Google Apps Script JDBC Connection in recent days, where connection via a hostname fails, but specifying an IP works.
Error: Failed to establish a database connection. Check connection string, username and password.
We first noticed this last Thursday.
The below code has been working flawlessly for 18 months or so.
var conn = Jdbc.getConnection("jdbc:mysql://myhost.com:3306/dbname","myuser","mypass");
It now necessary to use the IP instead.
var conn = Jdbc.getConnection("jdbc:mysql://10.20.30.40:3306/dbname","myuser","mypass");
Hoping one of the GAS team can comment.
Rob Google Apps GPF TC