2

I accidentally change the setting of my privileges for MySQL. When I tried to change it back, I received the following error:

1 errors were found during analysis. Unrecognized statement type. (near "GRANT" at position 0) SQL query: GRANT ALL PRIVILEGES ON . TO 'root'@'localhost' REQUIRE NONE WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0

MySQL said: Documentation #1045 -

Access denied for user 'root'@'localhost' (using password: NO).

How can I resolve this?

Your Common Sense
  • 156,878
  • 40
  • 214
  • 345
  • 1
    Possible duplicate of [MySQL ERROR 1045 (28000): Access denied for user 'bill'@'localhost' (using password: YES)](http://stackoverflow.com/questions/10299148/mysql-error-1045-28000-access-denied-for-user-billlocalhost-using-passw) – Amit Verma Mar 08 '16 at 03:11
  • the thing is , i didn't change the password but the setting in the privileges. i remove check from couple queries. and when i try to check the queries again, the error come out. i've tried changed my password and end up cannot enter my phpmyadmin at all. i'm sorry for the inconvenience. – Lutadiraf Hayadih Mar 08 '16 at 03:49
  • it's okay. i solved my problem. i simply uninstalled my xampp and delete all junk files related to it and reinstalled. it works for me. – Lutadiraf Hayadih Mar 09 '16 at 03:43

1 Answers1

1

You can do it from the GUI using Privileges:

  1. Login to phpMyAdmin.

  2. Click on the database you want to add a user to.

  3. Go to Privileges.

  4. Click Add a new User.

  5. Type the access info you want in the Login Information area (username, host, password).

  6. Click on the radio button for Create database with same name and grant all privileges.

  7. Click Go.

Pang
  • 9,564
  • 146
  • 81
  • 122
Mohamed Gabr
  • 716
  • 6
  • 18