I have a local web server running on my macbook and I've come across a strange problem. I can access MySQL just fine using a program like Sequel Pro, password works and life is great.
Within PHP, if I have the db server as 127.0.0.1, everything works as well.
However, if I change the db server to localhost, I get access denied for 'root'@'localhost' errors. I've made sure the MySQL socket is setup correctly, but still cannot use localhost.
Any insight would be awesome. Thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…