MySQL Forums
Forum List  »  Security

Recovering super-user access
Posted by: Ricardo Lino Gonzalez
Date: February 22, 2017 06:30AM

Hi,

Following some security tips for MySQL, I ran the command:
rename user 'root'@'localhost' to 'newrootuser'@'localhost';

But for one of my faults I did not execute the command FLUSH PRIVILEGES;
Now I can not log in as root again nor as newrootuser, the result when trying to log in is as follows:

# mysql -u newrootuser -p'password'
ERROR 1698 (28000): Access denied for user 'newrootuser'@'localhost'

Is there any way to regain access?
Will I have to reinstall MYSQL?

I have already tried command like:
# /etc/init.d/mysql stop
# mysqld_safe --skip-grant-tables --skip-networking &

But I was not able to recover root access as expected.

I have access through other users but they are not super user.

Below is the MySQL version
+----------------------------------+
| VERSION() |
+----------------------------------+
| 10.0.29-MariaDB-0ubuntu0.16.04.1 |
+----------------------------------+

Thanks.

Options: ReplyQuote


Subject
Views
Written By
Posted
Recovering super-user access
956
February 22, 2017 06:30AM
462
February 27, 2017 02:10AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.