Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-3935

java.sql.SQLException: Unable to load authentication plugin ''.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Mageia 2, MariaDB 5.5.25 , libmysql - 5.5.25-MariaDB, Lenovo ThinkPad 701, 8GB , hdd 320GB
      mysql-connector-java-5.1.21-bin.jar

      Description

      Writing a java program which shall connect to a MariaDB database.
      When running the program I get thwe following errormessage:
      [jan@Humlan FirstJDBCProgram]$ java bison
      Connecting to database...
      java.sql.SQLException: Unable to load authentication plugin ''.
      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:923)
      at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1715)
      at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1244)
      at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2397)
      at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2430)
      at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2215)
      at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:813)
      at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
      at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
      at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:399)
      at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:334)
      at java.sql.DriverManager.getConnection(DriverManager.java:579)
      at java.sql.DriverManager.getConnection(DriverManager.java:221)
      at bison.main(bison.java:25)
      Goodbye!

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            ratzpo Rasmus Johansson added a comment -

            I guess this is some early problem that has been fixed a long time ago, but please verify.

            Show
            ratzpo Rasmus Johansson added a comment - I guess this is some early problem that has been fixed a long time ago, but please verify.
            Hide
            wlad Vladislav Vaintroub added a comment -

            I was never able to reproduce it from. If this still persist, please report, but we'll need more information that the call stack

            Show
            wlad Vladislav Vaintroub added a comment - I was never able to reproduce it from. If this still persist, please report, but we'll need more information that the call stack
            Hide
            stevestorey Steve Storey added a comment -

            I can reproduce this - the comment from MDEV-545 was the key - the issue occurs when the password set on the mysql.user table uses an older format - of the form 7f84554057dd964b (which I believe is 'badpwd') rather than something like *AAB3E285149C0135D51A520E1940DD3263DC008C which is the newer form.

            Resetting the password for the user record(s) as noted in MDEV-545 does solve the issue as it upgrades the password format in the tables.

            Show
            stevestorey Steve Storey added a comment - I can reproduce this - the comment from MDEV-545 was the key - the issue occurs when the password set on the mysql.user table uses an older format - of the form 7f84554057dd964b (which I believe is 'badpwd') rather than something like *AAB3E285149C0135D51A520E1940DD3263DC008C which is the newer form. Resetting the password for the user record(s) as noted in MDEV-545 does solve the issue as it upgrades the password format in the tables.

              People

              • Assignee:
                wlad Vladislav Vaintroub
                Reporter:
                janpihlgren Jan Pihlgren
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: