Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
MySQL 1045 is explained here: webyog.com/faq/content/23/18/en/… –  Ashwin A Aug 10 '12 at 12:14
add comment

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.

share|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
add comment

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

share|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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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