How to set password to your root user in XAMPP

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

4. Refresh the page & will get an error message

Modifying phpMyAdmin config file:
1. open xampp installation path / phpmyadmin /
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
4. Chnage the line:
$cfg[‘Servers’][$i][‘auth_type’] = ‘config’;
$cfg[‘Servers’][$i][‘auth_type’] = ‘http’;
5. Now all set to go. Save the file and restart the XAMPP server.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.