Status Update
Comments
bg...@hofmangroup.com <bg...@hofmangroup.com> #2
Apps Script programs seem to connect just fine if the function is manually ran from a script. Functions called from a trigger or an Apps Script hosted webapp fail every time. Can also connect just fine from MySQL Workbench and other tools.
The Cloud SQL error log notes "Bad handshake"
ma...@article.com <ma...@article.com> #3
On the AWS side, the error that comes through says "Got an error reading communication packets". I know that is quite vague. I'll report back if AWS support is able to retrieve any more information.
da...@rockitcoin.com <da...@rockitcoin.com> #4
Today I am unable to run ANY scripts in the legacy editor. If I move the scripts to Runtime V8 and use the NEW editor, the scripts run, but I get the SQL error.
This seems to be a problem with the migration to V8 and the new editor.
bh...@shoot2sell.net <bh...@shoot2sell.net> #5
We are connecting to mySQL database running on a Google Compute Engine via jdbc calls
r....@anasystems.co.jp <r....@anasystems.co.jp> #6
jt...@grupoelcerezo.com <jt...@grupoelcerezo.com> #7
"Failed to establish a database connection. Check connection string, username and password"
ga...@google.com <ga...@google.com> #8
Hi there!
Thank you for your report, this has been reported internally.
Many thanks!
ga...@google.com <ga...@google.com>
jo...@rentokil-initial.com <jo...@rentokil-initial.com> #9
//Please see example of code that produces the error:
var address = 'dbAddress';
var user = 'userCredentials';
var userPwd = 'userPassword';
var db = 'dbName';
var dbUrl = 'jdbc:mysql://' + address + '/' + db;
var conn = Jdbc.getConnection(dbUrl, user, userPwd);
Error: Failed to establish a database connection. Check connection string, username and password.
[Deleted User] <[Deleted User]> #10
We are in exactly the same situation...
Please let me know what should I do!
Thank you
jo...@rentokil-initial.com <jo...@rentokil-initial.com> #11
This workaround seems to be stable. From Google's developer documentation:
// CloudSql connection name (located in GCP)
var connectionName = 'connectionName ';
var user = 'userCredentials';
var userPwd = 'userPwd';
var db = 'db';
var instanceUrl = 'jdbc:google:mysql://' + connectionName;
var dbUrl = instanceUrl + '/' + db;
var conn = Jdbc.getCloudSqlConnection(dbUrl, user, userPwd);
lu...@nextories.com <lu...@nextories.com> #12
Same issue connecting to an AWS MySQL instance (MySQL 5.7).
It used to work fine before today, and I can successfully connect to the database via any other tool.
Let us know if you find any workaround, that not only works for Google Cloud :)
Thanks!
vf...@zalando.de <vf...@zalando.de> #13
sa...@in.g4s.com <sa...@in.g4s.com> #14
Since today morning, we are also facing the same issue with the Cloud MySql connection, getting the message " Message: Failed to establish a database connection. Check connection string, username, and password. File: "
At the start, we were facing this issue with triggers but now the front end also got stuck.
al...@savings-united.com <al...@savings-united.com> #15
Same problem for us. All of our scripts crash with the same error. All the obvious checks made.
The connection is made successfully using third-party tools with the same connection data.
Thanks!
fe...@savings-united.com <fe...@savings-united.com> #16
Thank you
la...@bondcliq.com <la...@bondcliq.com> #17
ro...@gmail.com <ro...@gmail.com> #18
Scripts that have been running for years are now breaking with the error, "Exception: Failed to establish a database connection. Check connection string, username and password."
Can connect to the database without issue outside of Apps Script.
la...@bondcliq.com <la...@bondcliq.com> #19
As others are mentioning, we have been using these for years!
ro...@gmail.com <ro...@gmail.com> #20
Please escalate this to P1 or higher. If using a non-Google SQL database, there is no workaround.
la...@bondcliq.com <la...@bondcliq.com> #21
var instanceUrl = 'jdbc:google:mysql://' + connectionName;
var dbUrl = instanceUrl + '/' + db;
var conn = Jdbc.getCloudSqlConnection(dbUrl, user, userPwd);
PLEASE ESCALATE. Thanks
Note: Actually jdbc:goole seems to work now, as of 8:52 AM EST. Still checking.
br...@gmail.com <br...@gmail.com> #22
pl...@oncologosdeloccidente.co <pl...@oncologosdeloccidente.co> #23
jt...@grupoelcerezo.com <jt...@grupoelcerezo.com> #24
th...@gmail.com <th...@gmail.com> #25
pe...@empirisys.io <pe...@empirisys.io> #26
ad...@sportsforms.club <ad...@sportsforms.club> #27
ch...@gmail.com <ch...@gmail.com> #28
da...@empirisys.io <da...@empirisys.io> #29
*** NOTE that this only works with GCP MySQL instances***
var connectionName = 'Instance_connection_name'; //from MySQL instance page.
var user = 'user_name'; // var USERNAME = ' ';
var userPwd = 'user_password'; // var PASSWORD = ' ';
var db = 'database_name'; //var DATABASE = ' ';
var dbUrl = 'jdbc:google:mysql://' + connectionName + '/' + db;
// above is the replacement for your previous connection string variables.
and then, replace each of your conn objects with the following
var conn = var conn = Jdbc.getCloudSqlConnection(DBURL, USERNAME, PASSWORD);
Then
conn.createStatement(foo)...
ro...@gmail.com <ro...@gmail.com> #30
Please escalate.
ka...@verifieddms.com <ka...@verifieddms.com> #31
st...@ryanrestaurantcorp.com <st...@ryanrestaurantcorp.com> #32
me...@girlfridayvs.com <me...@girlfridayvs.com> #33
vf...@thoughtworks.com <vf...@thoughtworks.com> #34
ma...@ballotpedia.org <ma...@ballotpedia.org> #35
st...@ryanrestaurantcorp.com <st...@ryanrestaurantcorp.com> #36
ka...@verifieddms.com <ka...@verifieddms.com> #37
ma...@gmail.com <ma...@gmail.com> #38
'?useSSL=false' did not work in my case
vf...@thoughtworks.com <vf...@thoughtworks.com> #39
th...@gmail.com <th...@gmail.com> #40
ad...@nextgenleads.com <ad...@nextgenleads.com> #41
st...@ryanrestaurantcorp.com <st...@ryanrestaurantcorp.com> #42
ad...@nextgenleads.com <ad...@nextgenleads.com> #43
ma...@gmail.com <ma...@gmail.com> #44
Hi all, I did speak too soon, "?useSSL=false" was indeed the fix here. Are there security implications to this?
hc...@exertsrl.com.ar <hc...@exertsrl.com.ar> #45
ad...@gmail.com <ad...@gmail.com> #46
var url = 'jdbc:google:mysql://'+subname;
var quickfix = '?useSSL=false';
url = url + quickfix;
var info = { password: pwd, user: uid };
var conn = Jdbc.getCloudSqlConnection(url, info);
Adding '?useSSL=false' is not working for me (using 'jdbc:google:mysql')
This connection DOES work (without the quickfix) on "DEPRECATED_ES5"
However, I can't run any scripts in the legacy editor as of yesterday, and I can't debug ES5 in the new editor. So the only way to make this work is to use ES5, new editor, and NOT debug - just let it fly in production and hope for the best.
so...@gmail.com <so...@gmail.com> #47
ha...@effektivaltruisme.no <ha...@effektivaltruisme.no> #48
ha...@effektivaltruisme.no <ha...@effektivaltruisme.no> #49
ha...@effektivaltruisme.no <ha...@effektivaltruisme.no> #50
ji...@mkzbooks.com <ji...@mkzbooks.com> #51
ji...@hedgehoghs.com <ji...@hedgehoghs.com> #52
an...@gmail.com <an...@gmail.com> #53
ji...@mkzbooks.com <ji...@mkzbooks.com> #54
var dbUrl = "jdbc:mysql://" + IP + ":3306/" + DBNAME + "?useSSL=false";
function connectionTest() {
var conn = Jdbc.getConnection(dbUrl, user, userPwd);
conn.close();
}
[Deleted User] <[Deleted User]> #55
er...@madwire.com <er...@madwire.com> #56
de...@madwire.com <de...@madwire.com> #57
All of our Jbdc mysql connected database scripts have stopped running as of 12:00 AM MST today.
Error - "Failed to establish a database connection. Check connection string, username and password."
np...@fye.com <np...@fye.com> #58
au...@gmail.com <au...@gmail.com> #59
I have several Apps Scripts that connect to MySQL databases. They were all working for the past few years, but today they all stopped working at the same time, with the following error message:
"Failed to establish a database connection. Check connection string, username and password."
el...@gmail.com <el...@gmail.com> #60
r....@anasystems.co.jp <r....@anasystems.co.jp> #61
Hello.
In addition to changing theCloudSql connection, it seems necessary to add role members of Cloud SQL Client to IAM.
var instanceUrl = 'jdbc:google:mysql://' + connectionName;
var dbUrl = instanceUrl + '/' + db;
var conn = Jdbc.getCloudSqlConnection(dbUrl, user, userPwd);
mi...@datacompusa.com <mi...@datacompusa.com> #62
kh...@grutto.com <kh...@grutto.com> #63
gl...@ifirma.be <gl...@ifirma.be> #64
?useSSL=false did fix the issue
ko...@gmail.com <ko...@gmail.com> #65
Script that was working without problem for 2 years stopped with error 11/05
ko...@gmail.com <ko...@gmail.com> #66
Together we stand!
ko...@gmail.com <ko...@gmail.com> #67
vf...@thoughtworks.com <vf...@thoughtworks.com> #68
al...@gmail.com <al...@gmail.com> #69
ad...@gmail.com <ad...@gmail.com> #70
However, I am able to run it on ES5 again. Yesterday all scripts were failing on ES5 (not just JDBC scripts) and JDBC was failing on V8.
So, the JDBC scripts are working now for me on ES5, but it seems like a rollback, and not an actual fix.
ad...@frostysquirrel.ca <ad...@frostysquirrel.ca> #71
I want my 1/4 of the day back! But I will settle with you fixing this sooner than later, or simply incorporate this into Sheets as a Database Type Function so I can go back to being lazy. :D
ry...@gmail.com <ry...@gmail.com> #72
N.B.: Our MySQL 5.7 database is not hosted on Google Cloud SQL. Jdbc.getConnection had been working fine prior to this issue.
ga...@google.com <ga...@google.com> #73
Hi there!
A change was recently made which may have resolved this issue, can you please confirm if you are still experiencing the behaviour?
ad...@frostysquirrel.ca <ad...@frostysquirrel.ca> #74
ad...@gmail.com <ad...@gmail.com> #75
All queries (long and short) work on the old Rhino/ES5.
I am using:
Jdbc.getCloudSqlConnection(url, info)
And using Cloud SQL so my URL looks like:
var url = 'jdbc:google:mysql://'+subname;
be...@gmail.com <be...@gmail.com> #76
se...@google.com <se...@google.com> #77
Hello,
Can you confirm it is still happening to you?
Thank you!
be...@gmail.com <be...@gmail.com> #78
Yesterday it was still happening, but today it looks like it works.
Thank you
mi...@datacompusa.com <mi...@datacompusa.com> #79
be...@gmail.com <be...@gmail.com> #80
ga...@google.com <ga...@google.com> #81
Another change has been made, can you confirm please if you still see the same behaviour?
be...@gmail.com <be...@gmail.com> #82
in...@gmail.com <in...@gmail.com> #83
pa...@visma.com <pa...@visma.com> #84
It was all working well until yesterday 15:30 CET. Please advice.
Thank you.
eb...@frazerbilt.com <eb...@frazerbilt.com> #85
regards,
EAB
wc...@gmail.com <wc...@gmail.com> #86
[Deleted User] <[Deleted User]> #87
is...@gmail.com <is...@gmail.com> #88
Can anyone from google at least make a suggestion of a temporary fix?
[Deleted User] <[Deleted User]> #89
ro...@alo-group.com <ro...@alo-group.com> #90
ke...@barronltg.com <ke...@barronltg.com> #91
ju...@gmail.com <ju...@gmail.com> #92
ed...@parcelpickup.co.uk <ed...@parcelpickup.co.uk> #93
We hold the credentials for all the other external service we integrate with in this db so almost none of our other app scripts work any more!
Many thanks
ms...@gmail.com <ms...@gmail.com> #94
ma...@benicomp.com <ma...@benicomp.com> #95
hu...@gmail.com <hu...@gmail.com> #96
vi...@gmail.com <vi...@gmail.com> #97
[Deleted User] <[Deleted User]> #98
Exception: Failed to establish a database connection. Check connection string, username and password.
var conn = Jdbc.getConnection("jdbc:sqlserver://;user=;password=;databaseName=");
var stmt = conn.createStatement();
Is this a temporary issue that can be fixed? thanks
r....@gmail.com <r....@gmail.com> #99
se...@barecotton.com <se...@barecotton.com> #100
we...@jervoisventures.com <we...@jervoisventures.com> #101
te...@antiseptol.com <te...@antiseptol.com> #102
re...@gmail.com <re...@gmail.com> #103
I'm using jdbc:sqlserver:// via AppScript
Any workaround is appreciated. Feel free to reach out to me if you need more information.
ar...@abipa.lt <ar...@abipa.lt> #104
va...@titan.co.in <va...@titan.co.in> #105
jo...@igmonline.nl <jo...@igmonline.nl> #106
ga...@gmail.com <ga...@gmail.com> #107
this needs to be looked at asap
its a very imp bug
sh...@gmail.com <sh...@gmail.com> #108
ja...@gmail.com <ja...@gmail.com> #109
ma...@gmail.com <ma...@gmail.com> #110
pd...@gmail.com <pd...@gmail.com> #111
ha...@gmail.com <ha...@gmail.com> #112
this needs to be looked at asap
its a very imp bug
dh...@gmail.com <dh...@gmail.com> #113
this needs to be looked at asap
ni...@flexproltd.com <ni...@flexproltd.com> #114
Been long with so many comments and still no support!! need this issue resovled with mssql asap!!! so many products stuck!
n2...@gmail.com <n2...@gmail.com> #115
dm...@gmail.com <dm...@gmail.com> #116
aa...@gmail.com <aa...@gmail.com> #117
nm...@gmail.com <nm...@gmail.com> #118
ra...@gmail.com <ra...@gmail.com> #119
sp...@gmail.com <sp...@gmail.com> #120
nm...@gmail.com <nm...@gmail.com> #121
this needs to be looked at asap
ji...@gmail.com <ji...@gmail.com> #122
ne...@gmail.com <ne...@gmail.com> #123
Could you please look into it at earliest. It would really help us proceed further.
ch...@gmail.com <ch...@gmail.com> #124
this needs to be looked at asap..
Thanks
dk...@gmail.com <dk...@gmail.com> #125
please look into this
se...@gmail.com <se...@gmail.com> #126
don't know where the issue lies!
ad...@gmail.com <ad...@gmail.com> #127
bi...@gmail.com <bi...@gmail.com> #128
ma...@imerys.com <ma...@imerys.com> #129
Has anyone managed to solve this ?? Which solution please??
Thanks
Mauro
he...@gmail.com <he...@gmail.com> #130
Please help & fix this bug. It's very critical.
su...@gmail.com <su...@gmail.com> #131
te...@gmail.com <te...@gmail.com> #132
ma...@benicomp.com <ma...@benicomp.com> #133
di...@gmail.com <di...@gmail.com> #134
[Deleted User] <[Deleted User]> #135
ge...@gmail.com <ge...@gmail.com> #136
this needs to be looked at asap
jo...@igmonline.nl <jo...@igmonline.nl> #137
ni...@gmail.com <ni...@gmail.com> #138
ed...@parcelpickup.co.uk <ed...@parcelpickup.co.uk> #139
mi...@google.com <mi...@google.com> #140
Hello!
There has been a recent change which may have resolved this. Is anyone still experiencing this behavior?
re...@gmail.com <re...@gmail.com> #141
[Deleted User] <[Deleted User]> #142
Hi,
ke...@barronltg.com <ke...@barronltg.com> #143
mi...@google.com <mi...@google.com> #144
Thank you for your reports, I communicated this internally.
mi...@tamedia.ch <mi...@tamedia.ch> #145
mu...@google.com <mu...@google.com> #146
Hello everyone,
A fix has been pushed and you should be able to make the connection successfully. Can you confirm this?
al...@gmail.com <al...@gmail.com> #147
Also I had to disable SSL, which is not an acceptable solution. Please fix. Thanks
mu...@google.com <mu...@google.com> #148
Hello everyone,
I can confirm that the issue has now been fixed and everything is working as expected.
Best regards
tf...@gmail.com <tf...@gmail.com> #149
ma...@gmail.com <ma...@gmail.com> #150
Given how long this issue has persisted and how disruptive it is for the apps affected, could there be some kind of postmortem describing what happened here and what the chances are that it will happen again?
[Deleted User] <[Deleted User]> #151
Is this problem back again for the third time in the last two months? We're having issues once again.
jm...@aptuscr.com <jm...@aptuscr.com> #152
ck...@gmail.com <ck...@gmail.com> #153
ju...@gmail.com <ju...@gmail.com> #154
ro...@alo-group.com <ro...@alo-group.com> #155
ka...@ismena.com <ka...@ismena.com> #156
ch...@gmail.com <ch...@gmail.com> #157
it...@klehospital.org <it...@klehospital.org> #158
var port = 1433;
var dbName = 'Hospital';
var username = 'SA';
var password = '';
var url = 'jdbc:sqlserver://'+server+':'+port+'/'+dbName;
function readData() {
var conn = Jdbc.getConnection(url, username, password);
var stmt = conn.createStatement();
var results = stmt.executeQuery('SELECT * FROM cd_dcd where typ= 33');
var metaData=results.getMetaData();
var numCols = metaData.getColumnCount();
var spreadsheet = SpreadsheetApp.getActive();
var sheet = spreadsheet.getSheetByName('Sheet1');
sheet.clearContents();
var arr=[];
for (var col = 0; col < numCols; col++) {
arr.push(metaData.getColumnName(col + 1));
}
sheet.appendRow(arr);
while (results.next()) {
arr=[];
for (var col = 0; col < numCols; col++) {
arr.push(results.getString(col + 1));
}
sheet.appendRow(arr);
}
results.close();
stmt.close();
sheet.autoResizeColumns(1, numCols+1);
}
12:20:58 PM Error
Exception: Failed to establish a database connection. Check connection string, username and password.
readData @ Code.gs:8
lo...@gmail.com <lo...@gmail.com> #159
ch...@bingologistics.com <ch...@bingologistics.com> #160
The very unstable database connection is a killer using google cloud.
ap...@eastwestseed.com <ap...@eastwestseed.com> #161
[Deleted User] <[Deleted User]> #162
Please star and follow that ticket if you are still experiencing the JDBC connection issues.
pa...@eastwestseed.com <pa...@eastwestseed.com> #163
Error 1 :
Failed to establish a database connection. Check connection string, username and password.
Error 2 :
ro...@accepty.co.uk <ro...@accepty.co.uk> #164
Exception: Failed to establish a database connection. Check connection string, username and password.
[Deleted User] <[Deleted User]> #165
Exception: Failed to establish a database connection. Check connection string, username and password.
Can connect via any other means and my scripts some times runs fine, some times doesn't run with this error.
I also tried disabling SSL but didn't work.
I'm connecting to a 5.7 mysql Aurora 2.10.2 on AWS
Can you please verify it?
al...@gmail.com <al...@gmail.com> #166
Credentials are correct, its intermittent.. connects on some script runs, and on some runs it throws an error...
This is happening to several scripts.. It started yesterday.
jr...@gmail.com <jr...@gmail.com> #167
aw...@bingologistics.com <aw...@bingologistics.com> #168
sa...@gmail.com <sa...@gmail.com> #169
jr...@gmail.com <jr...@gmail.com> #170
ea...@gmail.com <ea...@gmail.com> #171
I followed the mysql-instance
created during the tutorial. I've tried both the connection name, and the IP. I tried appending ?useSSL=false
. Here's the StackOverflow question:
ar...@trbls.com <ar...@trbls.com> #172
'In order to create a database connection using the Apps Script JDBC service, in your database settings you must authorize IP ranges from this data source.'
Description
Our appscripts which connect to Google cloud mySQL, which have been running for months, are getting a "Failed to establish a database connection. Check connection string, username and password." error now. Every now and then. Same code works fine when the next (or the following) trigger runs.
Happens sporadically in a bunch of appscripts. (In Javascript)
Is there a system wide issue?
What steps will reproduce the problem?
1. Just trigger runs of appscript
2.
3.
What is the expected output? What do you see instead? If you see error messages, please provide them.
Please provide any additional information below.