I followed this link (http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html) to reset my forgotten password in mysql server on windows machine.
I'm getting the following error,
C:\>"C:\Server\Mysql\bin\mysqld" --defaults-file="C:\Server\Mysql\my.ini" --init
-file=C:\\mysql-init.txt
100725 23:45:35 [Warning] '--default-character-set' is deprecated and will be re
moved in a future release. Please use '--character-set-server' instead.
100725 23:45:35 [Note] Plugin 'FEDERATED' is disabled.
100725 23:45:36 InnoDB: Operating system error number 5 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory. It may also be you have created a subdirectory
InnoDB: of the same name as a data file.
InnoDB: File name .\ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
To run the above command, i logged into the command line interpreter as admin.
I tried to run with --datadir option, and i got the following output in log,
C:\>"C:\Server\Mysql\bin\mysqld" --datadir="C:\Server\Mysql" --defaults-file="C:
\Server\Mysql\my.ini" --console --init-file=C:\\mysql-init.txt
100726 10:57:26 [Warning] '--default-character-set' is deprecated and will be re
moved in a future release. Please use '--character-set-server' instead.
100726 10:57:26 [Note] Plugin 'FEDERATED' is disabled.
C:\Server\Mysql\bin\mysqld: Table 'mysql.plugin' doesn't exist
100726 10:57:26 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgr
ade to create it.
100726 10:57:26 InnoDB: Started; log sequence number 0 44233
100726 10:57:26 [ERROR] C:\Server\Mysql\bin\mysqld: unknown variable 'defaults-f
ile=C:\Server\Mysql\my.ini'
100726 10:57:26 [ERROR] Aborting
100726 10:57:26 InnoDB: Starting shutdown...
100726 10:57:31 InnoDB: Shutdown completed; log sequence number 0 44233
100726 10:57:31 [Note] C:\Server\Mysql\bin\mysqld: Shutdown complete
as mentioned above, when i tried to run mysql_upgrade file, it doesnt, as it requires to login.