Monday, August 20, 2018

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



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



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


I can't open the PHPMyAdmin panel. What am I doing wrong?


Answer



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;

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...