Answer the question
In order to leave comments, you need to log in
How to connect to mysql database via Google Script?
Greetings. On a virtual hosting (beget) there is a database to which I try to connect, but it does not come out, I write an error: Failed to connect to the database. Check the connection string and username and password. (line 9, database file)
function myFunction() {
const dbPassword = 'password';
const dbName = 'name';
const dbLogin = 'login';
const dbAdress = 'account.beget.tech';
var instanceUrl = 'jdbc:mysql://' + dbAdress;
var dbUrl = instanceUrl + '/' + dbName;
var conn = Jdbc.getConnection(instanceUrl, dbLogin, dbPassword);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question