It appears I have revoked my root access privileges to MySQL on my DO Ubuntu (Forge) server. I have searched the web to find out how to restore them (http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html) but they appear to require permissions that I don’t have when SSH’d into the server. Can anyone help me?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
OK I solved the issue: First I had to stop the SERVICE:
Then I could restart in safe mode with skip-grant-tables
And then restore the privileges
Then restart the service.
Thanks for your help.
When I do SUDO… I see the following:
Ryan, Thanks for your quick response … I was able to stop the MySQL server however the restart in safe mode failed (even when I did SUDO …)
I don’t understand what is going on here.
You should be able to do this by stopping the MySQL server and restarting it up in safe mode where you will not be prompted for a password. You can then restore your root details and restart the server to normal operation. This guide provides steps to reset a lost root password but once in safe mode you should be able to re-add the user account that was deleted and grant permissions.