MySQL Forums
Forum List  »  Install & Repo

Re: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Posted by: Dimitri Nagarov
Date: October 11, 2010 05:58PM

Hello,

I got this kind of error when I set up passwords for "root" user in phpMyAdmin (XAMPP).

For everyone who had the same problem, solution which worked for me was typing the actual password in the "config.inc.php" file (the location of this file is: C:/[your installation directory]/xampp/phpMyAdmin/config.inc [.php]).

Open the file with your text editor and find lines about authentication info like below. Most likely you will see somthing like this:
---------------------------------------------------------------
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
---------------------------------------------------------------
The line about password is empty and this is the actual cause of an error.

Now you should edit file to get:

---------------------------------------------------------------
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '[here type the password you set up in phpMyAdmin for "root" user]';
$cfg['Servers'][$i]['AllowNoPassword'] = false;
---------------------------------------------------------------
Save changes you made in the file.

It should solve the problem.

Best regards!

Options: ReplyQuote


Subject
Written By
Posted
June 27, 2009 08:29PM
December 16, 2007 02:18AM
December 27, 2007 02:08PM
January 16, 2011 06:51AM
August 27, 2009 12:22AM
Re: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
October 11, 2010 05:58PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.