Failed To Establish Database Connection using JDBC GetConnection











up vote
1
down vote

favorite












I have tried so many things over the course of today simply trying to establish a connection to a MySQL database on my VPS. I am not using GoogleCloud so jdbc.getConnection() is the correct call.



The same error persists:




"Failed to establish a database connection. Check connection string, username and password. (line 11, file ..."




..in this case line 11 is :



var conn = Jdbc.getConnection('jdbc:mysql://<IP ADDRESS>:3306/<DBNAME>', '<USER>', '<PWD>');



I have read on the Google Scripts help page and other threads to whitelist IP ranges. I am using MySQL Community version and I have manually updated the .ini file with the ranges listed. I run Workbench and inspect OPTIONS FILE/Replication.



group_replication_ip_whitelist



and the ranges I specified in the .ini don't appear. Just a single range (the field is a single line textbox , which suggests for multi-line you delimit with 'n'



On the face of it, even though the .ini file has the required IP ranges Workbench is not seeing them, or at least not displaying them correctly via the GUI.



I am convinced that the user/password are correct and the IP stated is definitely correct, so there appears to be something else blocking my attempts to connect.



UPDATE...
I have downloaded the plug-in for Chrome that enables MYSQL connectivity and it connected to the database first time , without issue.
So I am convinced the IP ranges that I have added to the MSQL .ini are simply not being seen by MySQL Server and so Jdbc isnt able to connect....



Is there any other way to determine what the whitelisted IP ranges are within MySQL ... without interrogating ->OPTIONS FILE/Replication..??










share|improve this question









New contributor




Guido is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
























    up vote
    1
    down vote

    favorite












    I have tried so many things over the course of today simply trying to establish a connection to a MySQL database on my VPS. I am not using GoogleCloud so jdbc.getConnection() is the correct call.



    The same error persists:




    "Failed to establish a database connection. Check connection string, username and password. (line 11, file ..."




    ..in this case line 11 is :



    var conn = Jdbc.getConnection('jdbc:mysql://<IP ADDRESS>:3306/<DBNAME>', '<USER>', '<PWD>');



    I have read on the Google Scripts help page and other threads to whitelist IP ranges. I am using MySQL Community version and I have manually updated the .ini file with the ranges listed. I run Workbench and inspect OPTIONS FILE/Replication.



    group_replication_ip_whitelist



    and the ranges I specified in the .ini don't appear. Just a single range (the field is a single line textbox , which suggests for multi-line you delimit with 'n'



    On the face of it, even though the .ini file has the required IP ranges Workbench is not seeing them, or at least not displaying them correctly via the GUI.



    I am convinced that the user/password are correct and the IP stated is definitely correct, so there appears to be something else blocking my attempts to connect.



    UPDATE...
    I have downloaded the plug-in for Chrome that enables MYSQL connectivity and it connected to the database first time , without issue.
    So I am convinced the IP ranges that I have added to the MSQL .ini are simply not being seen by MySQL Server and so Jdbc isnt able to connect....



    Is there any other way to determine what the whitelisted IP ranges are within MySQL ... without interrogating ->OPTIONS FILE/Replication..??










    share|improve this question









    New contributor




    Guido is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I have tried so many things over the course of today simply trying to establish a connection to a MySQL database on my VPS. I am not using GoogleCloud so jdbc.getConnection() is the correct call.



      The same error persists:




      "Failed to establish a database connection. Check connection string, username and password. (line 11, file ..."




      ..in this case line 11 is :



      var conn = Jdbc.getConnection('jdbc:mysql://<IP ADDRESS>:3306/<DBNAME>', '<USER>', '<PWD>');



      I have read on the Google Scripts help page and other threads to whitelist IP ranges. I am using MySQL Community version and I have manually updated the .ini file with the ranges listed. I run Workbench and inspect OPTIONS FILE/Replication.



      group_replication_ip_whitelist



      and the ranges I specified in the .ini don't appear. Just a single range (the field is a single line textbox , which suggests for multi-line you delimit with 'n'



      On the face of it, even though the .ini file has the required IP ranges Workbench is not seeing them, or at least not displaying them correctly via the GUI.



      I am convinced that the user/password are correct and the IP stated is definitely correct, so there appears to be something else blocking my attempts to connect.



      UPDATE...
      I have downloaded the plug-in for Chrome that enables MYSQL connectivity and it connected to the database first time , without issue.
      So I am convinced the IP ranges that I have added to the MSQL .ini are simply not being seen by MySQL Server and so Jdbc isnt able to connect....



      Is there any other way to determine what the whitelisted IP ranges are within MySQL ... without interrogating ->OPTIONS FILE/Replication..??










      share|improve this question









      New contributor




      Guido is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      I have tried so many things over the course of today simply trying to establish a connection to a MySQL database on my VPS. I am not using GoogleCloud so jdbc.getConnection() is the correct call.



      The same error persists:




      "Failed to establish a database connection. Check connection string, username and password. (line 11, file ..."




      ..in this case line 11 is :



      var conn = Jdbc.getConnection('jdbc:mysql://<IP ADDRESS>:3306/<DBNAME>', '<USER>', '<PWD>');



      I have read on the Google Scripts help page and other threads to whitelist IP ranges. I am using MySQL Community version and I have manually updated the .ini file with the ranges listed. I run Workbench and inspect OPTIONS FILE/Replication.



      group_replication_ip_whitelist



      and the ranges I specified in the .ini don't appear. Just a single range (the field is a single line textbox , which suggests for multi-line you delimit with 'n'



      On the face of it, even though the .ini file has the required IP ranges Workbench is not seeing them, or at least not displaying them correctly via the GUI.



      I am convinced that the user/password are correct and the IP stated is definitely correct, so there appears to be something else blocking my attempts to connect.



      UPDATE...
      I have downloaded the plug-in for Chrome that enables MYSQL connectivity and it connected to the database first time , without issue.
      So I am convinced the IP ranges that I have added to the MSQL .ini are simply not being seen by MySQL Server and so Jdbc isnt able to connect....



      Is there any other way to determine what the whitelisted IP ranges are within MySQL ... without interrogating ->OPTIONS FILE/Replication..??







      database jdbc google-apps-script connection






      share|improve this question









      New contributor




      Guido is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      Guido is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited 2 days ago





















      New contributor




      Guido is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked Nov 16 at 20:34









      Guido

      62




      62




      New contributor




      Guido is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Guido is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Guido is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





























          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });






          Guido is a new contributor. Be nice, and check out our Code of Conduct.










           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53345016%2ffailed-to-establish-database-connection-using-jdbc-getconnection%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          Guido is a new contributor. Be nice, and check out our Code of Conduct.










           

          draft saved


          draft discarded


















          Guido is a new contributor. Be nice, and check out our Code of Conduct.













          Guido is a new contributor. Be nice, and check out our Code of Conduct.












          Guido is a new contributor. Be nice, and check out our Code of Conduct.















           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53345016%2ffailed-to-establish-database-connection-using-jdbc-getconnection%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

          Alcedinidae

          Origin of the phrase “under your belt”?