This is the first time I've had to reach out for a question -- I'm truly stumped.
I have mysql up and running on a linux server (Ubuntu) and this morning tried to login to phpMyAdmin. I received an error that said I can't login. So I went to the command line, typed in
mysql -u root -p and when prompted for the password, entered it correctly. I then received the following error:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Here's the weird thing:
I can't connect via mysql on the command line nor through phpMyAdmin, but all my WordPress sites are working fine. However, if I try to login with one of the WP sites' credentials, I get the same kind of error as above.
etc/mysql/my.cnf and saw:
bind-address = 127.0.0.1. I tried to comment this out and restart mysql, no luck. I tried to change bind-address to localhost, and still no luck. Right now it's back to
bind-address = 127.0.0.1. This is the same setting I have for a second Linode with the exact same private ip/networking settings as this one (I set both of their static IPs up at the same time), yet the other server is working fine (can connect to MySQL) and this one just seems to hate me.
So the big question is: What is causing mysql to no longer allow me to connect, why can my WordPress sites still use their credentials (but I can't via phpmyadmin nor the command line), and how can I prevent this from eluding me in the future?
Possibly pertinent details:
Two days ago I setup a private IP on this linode.
cat /etc/hostsdoes contain localhost
127.0.0.1 localhost.localdomain localhost
ping localhostdoes return results:
ping localhost PING localhost.localdomain (127.0.0.1) 56(84) bytes of data. 64 bytes from localhost.localdomain (127.0.0.1): icmp_req=1 ttl=64 time=0.066 ms 64 bytes from localhost.localdomain (127.0.0.1): icmp_req=2 ttl=64 time=0.062 ms
Rebooted recently for the first time in two months -- Could that have something to do with it?
It seems like the root password automagically just changed on me...
Thank you so much for helping me out.