Resetting MySQL Root Password with XAMPP on Localhost

后端 未结 15 1565
北荒
北荒 2020-11-30 21:11

So for the past hour I\'ve been trying to figure out how to reset my \'root\' password for MySQL as I cannot log into PHPMyAdmin. I\'ve tried changing the password in the co

15条回答
  •  时光取名叫无心
    2020-11-30 21:58

    Open the file C:\xampp\phpMyAdmin\config.inc.php in your text editor. Search for the tags below and edit accordingly

    $cfg['Servers'][$i]['auth_type'] = 'cookie';
    $cfg['Servers'][$i]['user'] = 'root';
    $cfg['Servers'][$i]['password'] = 'password';
    $cfg['Servers'][$i]['extension'] = 'mysqli';
    $cfg['Servers'][$i]['AllowNoPassword'] = true;
    

    Where 'password' is your new password. In-between quotes.

    GO to your browser and visit link http://localhost/phpmyadmin/. Click on 'GO' without your new password. It would log you in and you would be able to see the "CHANGE PASSWORD". Proceed to change your password and you are done.

提交回复
热议问题