Gregoric
New member
cPanel User Name: avetrus
Name of Domain: surehow.gi9.co
Detailed Description: Dear staff member,
I have encountered a problem while trying to remotely access MySQL database located on Gigarank server. I am trying to connect to the database using Google Apps Script, which use JDBC to achieve such tasks.
Since I have read a topic with a bit similar issue (here: http://www.gigarocket.net/forum/thread-1753.html) I have ensured that I have set a "%" access host in the Remote MySQL section in cPanel, as Genesis had described in detail.
To connect to the database, I have literally copied a script presented on Google Developers tutorial page (here: https://developers.google.com/apps-script/guides/jdbc?hl=fr#read_from_the_database) and modified the crucial connection variables (user, password, etc.) to the proper ones.
Here is the configuration which I have prepared but which seemingly is set up wrongly.
The IP I have used in "db_ip" is taken from cPanel. I did not use the "surehow.gi9.co" domain as I think that Google Apps have some problems with those (as described here: http://stackoverflow.com/questions/13151909/google-apps-script-jdbc-connection-failed).
When attempting to run the script, such an error appears: "Failed to establish a database connection. Check connection string, username and password. (line 142, file "kod-lista")"
Could I request any advice from yours? I am using the remote MySQL connection for the first time, as well as the JDBC so I could messed something up. Also, you may want to read "Setup for other databases" section on this page https://developers.google.com/apps-script/guides/jdbc
Thank you in advance, best regards,
Gregoric
Additional Information: Not answered
Name of Domain: surehow.gi9.co
Detailed Description: Dear staff member,
I have encountered a problem while trying to remotely access MySQL database located on Gigarank server. I am trying to connect to the database using Google Apps Script, which use JDBC to achieve such tasks.
Since I have read a topic with a bit similar issue (here: http://www.gigarocket.net/forum/thread-1753.html) I have ensured that I have set a "%" access host in the Remote MySQL section in cPanel, as Genesis had described in detail.
To connect to the database, I have literally copied a script presented on Google Developers tutorial page (here: https://developers.google.com/apps-script/guides/jdbc?hl=fr#read_from_the_database) and modified the crucial connection variables (user, password, etc.) to the proper ones.
Here is the configuration which I have prepared but which seemingly is set up wrongly.
Code:
var db_ip = '37.187.74.24:3306',
db_user = 'avetrus_admin',
db_pass = 'my_password',
db_name = 'avetrus_tgs';
var db_url = 'jdbc:mysql://' + db_ip + '/' + db_name;
var conn = Jdbc.getConnection(db_url, db_user, db_pass);
The IP I have used in "db_ip" is taken from cPanel. I did not use the "surehow.gi9.co" domain as I think that Google Apps have some problems with those (as described here: http://stackoverflow.com/questions/13151909/google-apps-script-jdbc-connection-failed).
When attempting to run the script, such an error appears: "Failed to establish a database connection. Check connection string, username and password. (line 142, file "kod-lista")"
Could I request any advice from yours? I am using the remote MySQL connection for the first time, as well as the JDBC so I could messed something up. Also, you may want to read "Setup for other databases" section on this page https://developers.google.com/apps-script/guides/jdbc
Thank you in advance, best regards,
Gregoric
Additional Information: Not answered