Resetting MySQL Root Password with XAMPP on Localhost

后端 未结 15 1564
北荒
北荒 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 22:04

    1.-In XAMPP press button Shell

    2.-place command:

    mysqladmin -u root password

    New password: aqui colocar password ejemplo ´09876´

    3.-go on the local disk c: xampp \ phpMyAdmin open config.inic.php with notepad ++

    5.- add the password and in AllowNoPassword change to false

    /* Authentication type and info */
    
    $cfg['Servers'][$i]['auth_type'] = 'cookie';
    
    $cfg['Servers'][$i]['user'] = 'root';
    
    $cfg['Servers'][$i]['password'] = '09876';
    
    $cfg['Servers'][$i]['extension'] = 'mysqli';
    
    $cfg['Servers'][$i]['AllowNoPassword'] = false;
    
    $cfg['Lang'] = '';
    

    6.- save changes, clear browser cache and restart xampp

提交回复
热议问题