← Back to team overview

maria-developers team mailing list archive

auth_socket/unix_socket auth plugin naming incompatibility with Percona Server



I just tested a switch from Percona Server 5.6 to MariaDB 10.0.16 and
hit a problem with socket authentication.

I had it set up to auth root using the auth_socket plugin, but when I
switched to MariaDB I could no longer login as root. I get this error
from the client:

ERROR 1524 (HY000): Plugin 'auth_socket' is not loaded

Anyway, after I bunch of investigation, I found that the plugin used to
expose itself as socket_peercred but was renamed due to a conflict and
Percona and MariaDB chose different names to fix it.

Percona renamed it to auth_socket, matching the actual library filename
auth_socket.so and MariaDB chose unix_socket, but keeping the filename



This isn't great, but it's made worse because the plugin is successfully
loaded in both cases (because the filename is auth_socket.so) and no
errors are reported in the logs, but the plugin just exposes itself
internally using a different name so reports that auth_socket isn't
loaded in MariaDB.

I fixed it by starting mysql with skip-grant-tables and running:

update mysql.user set plugin='unix_socket' where plugin='auth_socket';

but that alone doesn't work, because MariaDB doesn't know that
unix_socket is provided by auth_socket.so:

ERROR 1524 (HY000): Plugin 'unix_socket' is not loaded

So I then added this to the config file, which fixed it:


Any thoughts on what to do here? Can the plugin be made to recognise
both names, so other users don't end up in this situation? I presume
there would need to be both auth_socket.so and unix_socket.so.

I also presume Percona would need to provide the same, to help those
moving from MariaDB to Percona.



Follow ups