[MDEV-11699] [Draft] unix_socket authentication does not work on some machines Created: 2017-01-01  Updated: 2021-01-22  Resolved: 2021-01-22

Status: Closed
Project: MariaDB Server
Component/s: Authentication and Privilege System
Affects Version/s: 5.5, 10.0, 10.1, 10.2
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Elena Stepanova
Resolution: Cannot Reproduce Votes: 0
Labels: None
Environment:

Debian Jessie x86_64



 Description   

Can't make unix_socket work on my machine, something must be missing.

MariaDB [test]> select @@version;
+----------------------+
| @@version            |
+----------------------+
| 5.5.54-MariaDB-debug |
+----------------------+
1 row in set (0.00 sec)
 
MariaDB [test]> install soname 'auth_socket';
Query OK, 0 rows affected (0.05 sec)
 
MariaDB [test]> create user elenst identified via 'unix_socket';
Query OK, 0 rows affected (0.00 sec)

MariaDB [test]> select @@socket;
+-----------------------------------+
| @@socket                          |
+-----------------------------------+
| /data/bld/5.5/data/tmp/mysql.sock |
+-----------------------------------+
1 row in set (0.00 sec)
 
MariaDB [test]> exit
Bye
elenst@jessie:/data/bld/5.5$ whoami
elenst
elenst@jessie:/data/bld/5.5$ bin/mysql --socket=/data/bld/5.5/data/tmp/mysql.sock -uelenst
ERROR 1698 (28000): Access denied for user 'elenst'@'localhost'

The socket itself is okay:

elenst@jessie:/data/bld/5.5$ bin/mysql --socket=/data/bld/5.5/data/tmp/mysql.sock -uroot -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 7
Server version: 5.5.54-MariaDB-debug Source distribution
 
Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
MariaDB [(none)]> 


Generated at Thu Feb 08 07:51:59 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.