1. Mysql -u root -p <please enter your password)

2. Enter to Mysql Dabase with use mysql command.

mysql> use mysql;

3. Upate your root passwrid with command

mysql> update user set password=PASSWORD("PasswordBaru") where User='root';
4. Refresh your database with command
mysql> flush privileges;