Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-129

java client fails to support socket authentication

    XMLWordPrintable

Details

    • Task
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 1.1.7
    • 1.4.0
    • Other
    • None

    Description

      Using MariaDB Java Client 1.1.7 and Sql Workbench Build 119 I loaded the MariaDB Java Client in as a Driver with jna 4.1.0 and used a url of: jdbc:mariadb://localhost/mysql?localSocket=/home/dan/software_projects/mariadb-trunk/mysql-test/var/tmp/mysqld.2.sock

      I used username dan corresponding to my local user.

      Grants where created

      MariaDB [mysql]> install plugin unix_socket soname 'auth_socket';
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [mysql]> grant all on *.* to 'dan'@'localhost' identified via 'unix_socket' with grant option;

      The application returned java backtrace of:

      2014-12-27 17:22 INFO  Creating new connection for [{Default group}/MariaDB - socket - socket auth] for driver=org.mariadb.jdbc.Driver and URL=[jdbc:mariadb://localhost/mysql?localSocket=/home/dan/software_projects/mariadb-trunk/mysql-test/var/tmp/mysqld.2.sock] 
      2014-12-27 17:22 ERROR Error connecting to the database using URL=jdbc:mariadb://localhost/mysql?localSocket=/home/dan/software_projects/mariadb-trunk/mysql-test/var/tmp/mysqld.2.sock, username=dan Could not connect: Client does not support authentication protocol requested by server; consider upgrading MariaDB client [SQL State=HY0000, DB Errorcode=-1] 
      java.sql.SQLException: Could not connect: Client does not support authentication protocol requested by server; consider upgrading MariaDB client
      	at org.mariadb.jdbc.internal.SQLExceptionMapper.get(SQLExceptionMapper.java:149)
      	at org.mariadb.jdbc.internal.SQLExceptionMapper.throwException(SQLExceptionMapper.java:106)
      	at org.mariadb.jdbc.Driver.connect(Driver.java:114)
      	at workbench.db.DbDriver.connect(DbDriver.java:429)
      	at workbench.db.ConnectionMgr.connect(ConnectionMgr.java:228)
      	at workbench.db.ConnectionMgr.getConnection(ConnectionMgr.java:158)
      	at workbench.gui.components.ConnectionSelector.doConnect(ConnectionSelector.java:233)
      	at workbench.gui.components.ConnectionSelector$2.run(ConnectionSelector.java:133)
      Caused by: org.mariadb.jdbc.internal.common.QueryException: Could not connect: Client does not support authentication protocol requested by server; consider upgrading MariaDB client
      	at org.mariadb.jdbc.internal.mysql.MySQLProtocol.checkErrorPacket(MySQLProtocol.java:526)
      	at org.mariadb.jdbc.internal.mysql.MySQLProtocol.connect(MySQLProtocol.java:480)
      	at org.mariadb.jdbc.internal.mysql.MySQLProtocol.connect(MySQLProtocol.java:673)
      	at org.mariadb.jdbc.internal.mysql.MySQLProtocol.<init>(MySQLProtocol.java:266)
      	at org.mariadb.jdbc.Driver.connect(Driver.java:110)
      	... 5 more
       
      2014-12-27 17:22 ERROR SQL Exception when connecting Could not connect: Client does not support authentication protocol requested by server; consider upgrading MariaDB client
      java.sql.SQLException: Could not connect: Client does not support authentication protocol requested by server; consider upgrading MariaDB client
      	at workbench.db.DbDriver.connect(DbDriver.java:460)
      	at workbench.db.ConnectionMgr.connect(ConnectionMgr.java:228)
      	at workbench.db.ConnectionMgr.getConnection(ConnectionMgr.java:158)
      	at workbench.gui.components.ConnectionSelector.doConnect(ConnectionSelector.java:233)
      	at workbench.gui.components.ConnectionSelector$2.run(ConnectionSelector.java:133)
      Caused by: java.sql.SQLException: Could not connect: Client does not support authentication protocol requested by server; consider upgrading MariaDB client
      	at org.mariadb.jdbc.internal.SQLExceptionMapper.get(SQLExceptionMapper.java:149)
      	at org.mariadb.jdbc.internal.SQLExceptionMapper.throwException(SQLExceptionMapper.java:106)
      	at org.mariadb.jdbc.Driver.connect(Driver.java:114)
      	at workbench.db.DbDriver.connect(DbDriver.java:429)
      	... 4 more
      Caused by: org.mariadb.jdbc.internal.common.QueryException: Could not connect: Client does not support authentication protocol requested by server; consider upgrading MariaDB client
      	at org.mariadb.jdbc.internal.mysql.MySQLProtocol.checkErrorPacket(MySQLProtocol.java:526)
      	at org.mariadb.jdbc.internal.mysql.MySQLProtocol.connect(MySQLProtocol.java:480)
      	at org.mariadb.jdbc.internal.mysql.MySQLProtocol.connect(MySQLProtocol.java:673)
      	at org.mariadb.jdbc.internal.mysql.MySQLProtocol.<init>(MySQLProtocol.java:266)
      	at org.mariadb.jdbc.Driver.connect(Driver.java:110)
      	... 5 more
       
      and an error:
       
      Could not connect: Client does not support authentication protocol requested by server; consider upgrading MariaDB client

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            danblack Daniel Black
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.