MariaDB has pluggable authentication, like PostgreSQL. Unlike PostgreSQL, I can't figure out how to support two forms of auth for a user. For instance, in PostgreSQL we can have the following in our pg_hba.conf
# TYPE DATABASE USER ADDRESS METHOD
host all all all md5
local all all peer
This permits
- all users to connect using password auth
- all users that are local to connect using the peer method
How do I make it so all local users can connect over Unix sockets if they're authenticated with the operating system, and with a password in the event one is set in the database?
MariaDB provides
mysql_native_password
unix_socket
It seems the mysql.user only supports one "plugin"
MariaDB [mysql]> SELECT user,host,plugin FROM user;
+------+-----------+-------------+
| user | host | plugin |
+------+-----------+-------------+
| root | localhost | unix_socket |
+------+-----------+-------------+
1 row in set (0.00 sec)