Skip to content

Commit

Permalink
Amend default MySQL connection parameters for MySQL 5 - 8 compatibility
Browse files Browse the repository at this point in the history
Fixes #736
  • Loading branch information
Richard North committed May 15, 2019
1 parent 781dc40 commit d1da6b0
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,14 @@ protected String constructUrlForConnection(String queryString) {

if (! url.contains("useSSL=")) {
String separator = url.contains("?") ? "&" : "?";
return url + separator + "useSSL=false";
} else {
return url;
url = url + separator + "useSSL=false";
}

if (! url.contains("allowPublicKeyRetrieval=")) {
url = url + "&allowPublicKeyRetrieval=true";
}

return url;
}

@Override
Expand Down

0 comments on commit d1da6b0

Please sign in to comment.