In XAMPP, the default authentication methods expects, the mysql root user does not require a password. If you are changing root password, there are 2 steps to follow, I am explaining it in sequence.
Step #1: Making Database changes
Change MySQL password using phpmyadmin, Go to your phpmyadmin page:
# run the below sql statement (change to your own password)
set password for root@localhost = PASSWORD('mypassword');
Step #2: Edit phpmyadmin configuration file
Make the below change in configuration (setting to cookie)
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
Step #3: Logout and Login to phpMyAdmin
Now, phpmyadmin will fail to authenticate!
Relogin using the new root password to continue.