change mysql root password
$ sudo mysql -u root -p
Enter password: (enter your root password)
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your_new_password';
mysql> FLUSH PRIVILEGES;
mysql> exit;
then to confirm
mysql -u root -p
Enter password: ********
Success!!!