Access denied for user 'root'@'localhost' with PHPMyAdmin

前端 未结 2 859
天命终不由人
天命终不由人 2020-11-28 08:32

When I set the root password in PHPMyAdmin, I get this error:

#1045 - Access denied for user \'root\'@\'localhost\' (using password: NO)

I

2条回答
  •  情话喂你
    2020-11-28 09:22

    Edit your phpmyadmin config.inc.php file and if you have Password, insert that in front of Password in following code:

    $cfg['Servers'][$i]['verbose'] = 'localhost';
    $cfg['Servers'][$i]['host'] = 'localhost';
    $cfg['Servers'][$i]['port'] = '3306';
    $cfg['Servers'][$i]['socket'] = '';
    $cfg['Servers'][$i]['connect_type'] = 'tcp';
    $cfg['Servers'][$i]['extension'] = 'mysqli';
    $cfg['Servers'][$i]['auth_type'] = 'config';
    $cfg['Servers'][$i]['user'] = '**your-root-username**';
    $cfg['Servers'][$i]['password'] = '**root-password**';
    $cfg['Servers'][$i]['AllowNoPassword'] = true;
    

提交回复
热议问题