[MDEV-3935] java.sql.SQLException: Unable to load authentication plugin ''. Created: 2012-12-13  Updated: 2013-06-16  Resolved: 2013-06-06

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Jan Pihlgren Assignee: Vladislav Vaintroub
Resolution: Cannot Reproduce Votes: 1
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!



 Comments   
Comment by Rasmus Johansson (Inactive) [ 2013-06-06 ]

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

Comment by Vladislav Vaintroub [ 2013-06-06 ]

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

Comment by Steve Storey [ 2013-06-16 ]

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.

Generated at Thu Feb 08 06:52:23 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.