2

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

  1. all users to connect using password auth
  2. 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)
asked Aug 3, 2017 at 15:55

1 Answer 1

2

As you said, a given user can only support one plugin. It is described in more details in the MySQL manual.

answered Aug 9, 2017 at 11:10

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.