From the MySQL documentation of
access-denied
If you get the following error, it means that you are using an incorrect root password:
shell> mysqladmin -u root -pxxxx ver
Access denied for user 'root'@'localhost' (using password: YES)
If the preceding error occurs even when you have not specified a password, it means that you have an incorrect password listed in some option file. Try the --no-defaults option as described in the previous item.
Also note that it's somtimes necessary to include a specific entry for "localhost" in the authroiztion tables, even though there is a wild-card entry that you think should cover the "localhost" case. It has to do with precedence and interactcion between tables, I think, but I can't find the spot in the documentation that mentions it, from where I am right now.