Access denied for user 'root'@'localhost'

Hi,

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.

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.