[CONJ-129] java client fails to support socket authentication Created: 2014-12-27 Updated: 2016-05-23 Resolved: 2016-05-23 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | Other |
| Affects Version/s: | 1.1.7 |
| Fix Version/s: | 1.4.0 |
| Type: | Task | Priority: | Minor |
| Reporter: | Daniel Black | Assignee: | Diego Dupin |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Environment: |
java version "1.7.0_71" jna 4.1.0 (https://github.com/twall/jna) |
||
| 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
The application returned java backtrace of:
|
| Comments |
| Comment by Jaakko Kantojärvi [ 2015-03-05 ] |
|
I can confirm this with connector versions 1.1.6, 1.1.7 and 1.1.8. Using oracle java 1.8.40 and mariadb 10.0. |
| Comment by Daniel Black [ 2015-07-13 ] |
|
Here are the changes I did to a python implement to make this happen https://github.com/PyMySQL/PyMySQL/pull/353 The key aspect is adding plugin_auth to the capabilities on connection ( https://github.com/MariaDB/mariadb-connector-j/blob/master/src/main/java/org/mariadb/jdbc/internal/mysql/MySQLProtocol.java#L425 ). That might be all that is required. |
| Comment by Daniel Black [ 2015-07-13 ] |
|
all patched and working: https://github.com/MariaDB/mariadb-connector-j/pull/21 tested on password and unix_socket authentication (mariadb-10.1). debugging tip of the day: socat -x -v UNIX-LISTEN:/tmp/db.sock,fork UNIX:/var/lib/mysql/mysql.sock |
| Comment by Daniel Black [ 2015-08-06 ] |
|
so is https://github.com/MariaDB/mariadb-connector-j/pull/22 a good start? |
| Comment by Diego Dupin [ 2016-05-23 ] |
|
"plugin_authentication" like "unix_socket" has been implemented in 1.4. |