I recently setup a MySQL server and encounted the following error when I ran the mysql console (and incidentally the administrator GUI tool):

ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)

I had done a standard installation and reached the last page in the configuration wizard when the security check stage failed with an error suggesting that the MySQL port was blocked by a firewall.

closed the wizard, checked there was no firewall running and then and tried running mysql and the administrator GUI and found the same error in both cases.

Can anyone suggest a solution to the problem or perhaps resources for diagnosing MySQL problems.

link|improve this question
feedback

2 Answers

up vote 1 down vote accepted

You may need to reset your root password. I had a similar problem a while back.

Details: How to reset the root password

The basic process involves stopping the server and restarting it with a special initialization script.

link|improve this answer
Thanks, this worked perfectly. I do wonder what the installer did to incorrectly set the root password. I would blame myself using the wrong password, but it actually failed from the config wizard where you set the thing. – RedBlueThing May 1 '09 at 5:20
feedback

1045 is generally "access denied". See the MySQL documentation for suggestions about how to deal with this.

link|improve this answer
Heh, I noticed that 1045 mapped to "access denied" when I read the message "ERROR 1045: Access denied ...". – RedBlueThing May 1 '09 at 3:13
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.