1

Server version: 5.5.47-MariaDB-log MariaDB Server / CentOS Linux 7 x86_64

I have two users: user@% and user@localhost with the same password but apparently different privileges (some privileges the 1st user has were missing from the 2nd user), and a bunch of Wordpress blogs and Rails apps connecting to this database server.

Out of a sudden a couple hours ago, everything stopped working, throwing "database access denied" errors all over the logs. After granting full privileges to the second user, all went back to normal.

I never connect to "localhost" or "127.0.0.1" or any of the public IP addresses, but use a host name instead (database.example.com) which I point to whatever IP I want either via DNS or /etc/hosts file, in this case it was mapped to 127.0.0.1.

Is there a reason why MariaDB / MySQL would pick the first user over the other at any random point in time? Nobody touched anything.

  • Check the other privileges; the algorithm for picking which one rules, is rather contorted. – Rick James May 7 '16 at 4:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.