Mysql – How to change the default authentication method in MariaDB / MySQL

mariadbMySQL

I'm trying to set the default authentication method to unix_socket.

Following the instructions here:
https://lindevs.com/change-default-authentication-plugin-in-mysql/

I added to my.cnf :

[mysqld]    
default_authentication_plugin=unix_socket

And restarted: sudo service mysql restart

Unfortunately, I don't see any change:

MariaDB [(none)]> SHOW VARIABLES LIKE 'default_authentication_plugin';
Empty set (0.001 sec)

This is on WSL1 and 10.3.27-MariaDB-0+deb10u1-log Debian 10.

Thanks

Best Answer

default_authentication_plugin is a MySQL system server variable and not in MariaDB.

For the moment you'll need to specify the plugin explicitly when creating users.

There's no feature requests to add this functionality yet.