Tuesday, October 29, 2019

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

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...