Forget your root password, you can like this :
To windows as an example:
1. Turn off the MySQL service is running.
2. Open a DOS window, go to the mysql \ bin directory.
3. Enter mysqld --skip-grant-tables carriage. --skip-grant-tables means that the time to start MySQL service permission to skip the authentication table.
4. to open a DOS window (DOS window because that just can not move), go to the mysql \ bin directory.
5. Enter the mysql enter, if successful, will appear MySQL prompt>.
6. Connect authority database : use mysql;.
6. Change Password: update user set password = password ( "123") where user = "root"; (Remember last semicolon).
7. refresh permission (must step): flush privileges;.
8. Quit quit.
9. log off the system, re-entry, using the username root and the password just set up 123 new login.