Part of the following article came from the MySQL wesbite: http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html
It explains how to reset the root password for different databases in various operating systems.
Please refer to the attached document.