Oops
This is on your local machine, I suppose? In Start-> Run, enter "services.msc" and find the MySQL service. Stop the service.
Edit:
Locate the my.ini file (usually in C: \ Windows or C: \ mysql, etc.). If you donβt have one, create one . This is a simple ASCII file.
Modify the file, add it to the [mysqld] section: skip-grant-tables .
At the command prompt, run net start MySQL and wait a minute. The MySQL service should start.
At the command prompt, run mysql -u root and press ENTER. You must log in to MySQL as the root user. Carefully modify your grants and log out. Stop the MySQL service / server. Re-edit the my.ini file and delete / comment out the line skip-grant-tables and restart the server. Try logging in again as root.
Just tested it in my Win XP Pro.
This essentially has the effect of traversing all the grant tables and thus does not require a search whether you should access it from this machine or not.
MySQL reference guide: - skip-grant-tables option
source share