Resetting MySQL Root Password with XAMPP on Localhost
You want to edit this file: "\xampp\phpMyAdmin\config.inc.php"
change this line:
$cfg['Servers'][$i]['password'] = 'WhateverPassword';
to whatever your password is. If you don't remember your password, then run this command within the Shell:
mysqladmin.exe -u root password WhateverPassword
where WhateverPassword is your new password.
Steps:
- Open your phpMyadmin dashboard
- go to user accounts
- on the user section Get the root user and click [ Edit privileges ]
- in the top section you will find change password button [ click on it ]
- make a good pass and fill 2 pass field .
- now hit the Go button.
7 . now open your xampp dir ( c:/xampp ) --> 8 . to phpMyadmin dir [C:\xampp\phpMyAdmin]
- open [ config.inc.php ] file with any text editor
10 .find [ $cfg['Servers'][$i]['auth_type'] = 'config';
]line and replace 'config' to ‘cookie’
- go to [
$cfg['Servers'][$i]['AllowNoPassword'] = true;
] this line change‘true’ to ‘false’
.
last : save the file .
here is a video link in case you want to see it in Action [ click Here ]
You can configure it with the "XAMPP Shell" (command prompt). Open the shell and execute this command:
mysqladmin.exe -u root password secret