0

I have installed wampserver. i revoke the the delete privilege from root user. now i want to grant same privilege back to root user but it gives the error:

i tried the following command

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;

but the command gives the

#1045 - Access denied for user 'root'@'localhost' (using password: YES)

there are two root users

root localhost
root 127.0.0.1

root localhost do not have DELETE privilege. root 127.0.0.1 have all privileges. i tried with http://127.0.0.1/phpmyadmin but the same error occurs. is there a way to reset root user privileges.

luksch
  • 11,497
  • 6
  • 38
  • 53
user1543848
  • 29
  • 1
  • 10

1 Answers1

0

I have had issues with GRANT ... TO 'user'@'%' ... before. Try to additionally issue the following GRANT statement:

GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;

For me, this did the trick. Somehow mysql seems picky when it comes to localhost

luksch
  • 11,497
  • 6
  • 38
  • 53
  • same error ... #1045 - Access denied for user 'root'@'localhost' (using password: YES) – user1543848 Jul 09 '13 at 11:01
  • Sorry to hear that. I have no more ideas currently about this. Did you only try via php-admin or also directly on the mysql console? – luksch Jul 09 '13 at 11:12