after reset root password I still get "Access denied for user 'root'@'localhost'"
You are viewing an old version of this article. View
the current version here.
I reset the root password of the mariadb server but when I then try to login, I still get Access denied for user 'root'@'localhost'
To change the root password I did the following: (my setting: 10.0.31-MariaDB-0ubuntu0.16.04.2)
sudo service mysql stop
sudo mysqld_safe --skip-grant-tables &
mysql -u root
MariaDB [(none)]> use mysql;
MariaDB [mysql]> update user set password=PASSWORD("hello") where User='root';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
MariaDB [mysql]> flush privileges;
MariaDB [mysql]> exit
sudo service mysql stop
sudo service mysql start
mysql -u root -p
Enter password: <<== here I entered the 'hello' password but still receive:
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
So, what am I doing wrong ??
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.