Access denied for user 'root'@'localhost'
Posted by: JohnK (---.booknews.com)
Date: February 28, 2007 10:08PM

Hello:

I have just installed WAMP5 and the services for Apache and MySQL are working fine. Following suggestions found on this forum I passworded access to MySQL by using the MySQL console and editing config.inc.php. I can run MySQL just fine from the command line which first asks for my password. Now I am trying to run phpAdmin. Here are the two error messages I get:
===========================
Error

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

Invalid server index: ""
===========================

Underneath the error msgs it showed: Servers: localhost(root)

I changed one line in config.inc.php as follows (line 31 on my editor):

$cfg['Servers'][$i]['password'] = 'xxxx';

I am particularly puzzled by the statement"using password: NO".

Help! and thanks.

JohnK


Options: ReplyQuote
Re: Access denied for user 'root'@'localhost'
Posted by: advancer77 (---.olp.net)
Date: March 01, 2007 02:20AM

First thought . . .did you stop and restart services? Probably, so . . .

It doesn't look as though the password for root has really changed. When I first changed my root password, I did the following:

In a command prompt (DOS) window and in the directory where the mysql executable resides, I typed

mysql -u root mysql

Once connected to the mysql server, I typed

SET PASSWORD FOR root@localhost=PASSWORD("xxxxx"winking smiley;
FLUSH PRIVILEGES;
quit;

Of course, xxxxx would be your new password.

Then I stopped and restarted services.



Post Edited (03-01-07 02:24)

Options: ReplyQuote
Re: Access denied for user 'root'@'localhost'
Posted by: CyberSpatium (71.237.217.---)
Date: March 03, 2007 02:31PM

if you are new to using phpmyadmin, you can see my tutorial here:

[forum.wampserver.com]


CyberSpatium
----------------------------
Wamp English Forum Admin

Options: ReplyQuote


Sorry, only registered users may post in this forum.