If you have had this strange dilemma in MySQL grant tables for Windows, I recommend the following:
Step 1. Get the ZIP FIle distribution that does not have the installer in it.
Step 2. Unzip it's contents to C:\MySQLZipStuff
Step 3. Look for the folder C:\MySQLZipStuff\data\mysql
Step 4. Copy all the files in C:\MySQLZipStuff\data\mysql over to the mysql folder of your desired data directory.
Step 5. net start mysql
If you have the mysql folder already you can do this instead:
Step 1. Edit my.ini by adding this line in the [mysqld] section
skip-grant-tables
Step 2. net stop mysql
Step 3. net start mysql
At this point, you can just type 'mysql' and you are in. However, you cannot run GRANT commands with grant tables disabled.
Step 4. You will have to enter one superuser manually. Like this
a) INSERT INTO mysql.user SET user='root',host='localhost';
b) SELECT * FROM mysql.user WHERE user='root' AND host='localhost'\G
This will show all the columns in the user table. You will have to then manually change each column like this:
UPDATE mysql.user SET select_priv='Y',insert_priv='Y',... WHERE user='root' AND host='localhost';
c) Setup a password for root@localhost like this:
UPDATE mysql.user SET password=PASSWORD('whateverpasswordyouwant') WHERE user='root' AND host='localhost';
Step 5. Remove 'skip-grant-tables' from my.ini
Step 6. net stop mysql
Step 7. net start mysql
Now you can log into mysql as root using 'whateverpasswordyouwant' as the password.
Give it a Try !!!