By default XAMPP has no password to it’s ‘root’ user but we can set password for this user by the following steps:
1. Open phpmyadmin
2. Click on SQL tab
3. Copy & paste the following query:
UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root'; FLUSH PRIVILEGES;
4. Refresh the page & will get an error message
Modifying phpMyAdmin config file:
1. open xampp installation path / phpmyadmin / config.inc.php
2. Search for the string $cfg[‘Servers’][$i][‘password’] = ”;
3. it will be like: $cfg[‘Servers’][$i][‘password’] = ‘password’;
Here the ‘password’ is what we set to the ‘root’ user using the SQL
query.
4. Chnage the line:
$cfg[‘Servers’][$i][‘auth_type’] = ‘config’;
to
$cfg[‘Servers’][$i][‘auth_type’] = ‘http’;
5. Now all set to go. Save the config.inc.php file and restart the XAMPP server.