I use ClearOS 5.1. and was about to install WordPress. I created the WordPress DB and a MySQL account with ALL privileges. I then naively removed ALL grants from root@localhost in PHPMyAdmin (thinking that root@'%' would still retain all grants). Although I can login using root@localhost, I can't do anything!!
Is there a simple way to restore ALL GRANTS privs to root@localhost? If not, do I need to re-install PHPMyAdmin or MYSQL (or both)?
thanks.
Is there a simple way to restore ALL GRANTS privs to root@localhost? If not, do I need to re-install PHPMyAdmin or MYSQL (or both)?
thanks.
In Database
Share this post:
Responses (2)
-
Accepted Answer
-
Accepted Answer
Hi Richard,
You need to do following:
Stop the mysqld process;
Start mysql by hand with the following command:
/usr/bin/mysqld_safe --skip-grant-tables
"This option causes the server to start without using the privilege system at all, which gives anyone with access to the server unrestricted access to all databases."
Now you can restore the grant privileges. After doing that make sure to stop the server process and start it again the usual way.
rgrds,
Bráulio Gergull
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »