You will need to specify the root password before you can run this command. If you do not know the root password then its better to reset it.
Stop MySQL server.
Search for my.cnf file in your MySQL installation folder and add skip-grant-tables under [mysqld].
Start MySQL Server.
Open command promot and cd to MySQL bin folder
Enter MYSQL prompt as mysql -u root
Execute the following command (Note: Replace YOUR_PASSWORD with your actual password.):
UPDATE user SET Password=PASSWORD('YOUR_PASSWORD') WHERE Host='localhost' AND User='root';
Remote [B]skip-grant-tables[/B from my.cnf
Restart MySQL Server.
Then you will be able to login to MySQL as:
mysql -u root -p
or run mysqladmin command as:
mysqladmin -u root -p status
-p flag defines that the root password will be supplied so as you run any of these command, you will be asked to input root password.