Many methods
1. In DOS, go to the Bin folder in the MySQL installation directory
Mysqladmin-u root-p Password 123456
2. First log in to MySQL with the root account and then execute:
UPDATE user SET Password=password (' 123456 ') WHERE user= ' root ';
Flush privileges;//Refresh the data table and restart the MySQL server if you don't want to call.
Ps:
Try not to change the root password, you can create a user, give permission to modify that, once I was to modify the school database server root password results but caused the root of the loss of permissions, find are not back, the results of the database can not be backed up, fortunately there are other solutions.
Wamp environment under the root password modified phpMyAdmin, you need to modify the phpMyAdmin installation directory in the config.inc.php file password, as follows:
Modify the root password of MySQL