By default, when you install XAMPP in your windows machine, the ‘root’ password for the MySQL is set to empty. But this is not recommended, as the MySQL database without a password will be accessible to everyone. To avoid this, a proper/secure password must be set to the user ‘root‘. To do it in XAMPP, there are two ways.
This article explains how to change the MySQL root password in XAMPP for windows.