I'm at my wits end trying to solve this issue. I can log into the root account (or any other account for that matter) just fine in PHPmyadmin. Howerver whenever I try to log in via the command line, I get the following error:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
I've even tried creating a new user, making sure to specify its host as "localhost" and not "127.0.0.1" or "%" and it still doesn't work.
I don't even know where to begin at this point, as I've exhausted all the options from googling "Access denied for user 'root'@'localhost'".
Making a new user in phpmyadmin:
Trying to log in with it on CLI:
Yet (and this is not something easily shown in a screenshot) I can log into phpmyadmin using that same username & password.
This is a production server that I inherited and it's been running just dandy for at least 4 years now, so I really can't tell you much about how it was setup. Also, some of the recommendations of uninstall/reinstall, stop, etc are simply not possible at this time.
My questions (I've seen other 'questions' closed for not stating this clearly):
Some additional details:
Specify the port by adding -P3307
to your login string.