Access denied for user 'root'@'localhost'
I'm getting the above error when using Adminer to access my MariaDB database, created by installing mysql-server and mysql-client.
I know for a fact that the password is correct.
At the beginning, I had the default root@localhost. I set its host to % instead. I then set authentication_string = PASSWORD('pw') and plugin = 'mysql_native_password'. I then flushed privileges.
I also set bind-address to 0.0.0.0.
Then I tried creating another user, root@localhost because that's what Adminer is complaining about. I gave it all privileges and set its password to the same as root@%. Now I can't access the mysql console whatsoever because it's now saying 'Access denied for user 'root'@'localhost' (using password: YES)' in the console.
This issue is pathetic and has already wasted a whole day. Could you please shed some light on it? I've done the exact same as above countless times before and it's worked fine.
Answer Answered by Ricky Fisher in this comment.
It turned out that the issue was that I was accessing Adminer over http, not https. Enabling https in my Apache config solved the issue.