Friday, 30 November 2018

linux - mysql (mariadb) ERROR 1698 (28000): Access denied for user 'root'@'localhost'


I'm working on Xubuntu 15.04. I already installed the MariaDB-Server on various systems and was always asked for a root password during installation. This time, however, I don't remember being asked for the password. When I try to login without a password (or a blank password), I get the Access denied for user 'root'@'localhost' error. I tried uninstalling the package completely by


sudo apt-get remove mariadb-server
sudo apt-get purge mariadb-server

When I reinstalled, I still didn't get asked for the root password.


I tried the mysqld --skip-grant-tables approach from mysql how to fix Access denied for user 'root'@'localhost' . I can modify the password for the root user in the mysql database - at least the hash value changes - but I still cannot login with the new password after a restart of the mysql-server. I still get the same error.


The user debian-sys-maint does not exist. So, I cannot use it to fix anything.


Any ideas what else I could try?



Answer



I solved the problem following the answer from this post:


Can't reset MySQL (MariaDB) root password


One has to change the plugin field of mysql.user for all roots to a blank string.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...