First log in to MySQL.
Run command line window mysql
and then execute the command set password for ....
Format: mysql> set password for the user name @localhost = password ( 'new password');
examples: mysql> set password for root @ localhost = password ( '123');
After logging out, log in again
mysql -u root -p 123