Hi I know its an old question but I have tried many answers and guides but all in vain. I was using phpmyadmin without password on my local machine previously and I changed password using command prompt on windows with following command
mysqladmin.exe -u root password root
Since then I am not able to open my localhost/phpmyadmin and I get following error
1045 - Access denied for user 'root'@'localhost' (using password: NO)
I have tried changing config.inc.php current status of this file is as following
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';
/* Bind to the localhost ipv4 address and tcp */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';
I have tried changing password from localhost/security.php and changed password to 123. I have also tried reseting root password by opening resetroot.bat batch file. I seriously think I have messed all up so if someone can help me here i shall be thank full. I am using Xampp on windows 7
EDIT Also I would like to tell you that I have tried giving new password to
$cfg['Servers'][$i]['password'] = '';
And also to
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';
changing user to root
After installing a local WAMP server and trying to access your phpMyAdmin, you may encounter the error: #1045 Access Denied for user 'root'@'localhost' (using password: YES). This may happen if your root@localhost database user was not granted the necessary rights to access the database.
Open xampp/phpMyAdmin/config.inc and change the line
$cfg['Servers'][$i]['auth_type'] = 'config';
to
$cfg['Servers'][$i]['auth_type'] = 'cookie';
PhpMyAdmin will then show a login screen where you can enter your username and password.
You are define your root password to 'root' with a command prompt, so in config you must have to use same :
$cfg['Servers'][$i]['password'] = 'root';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With