SQLSTATE[HY000] [2002] Can't connect to local MySQL server

Just need to use 127.0.0.1 instead of 'localhost' in the configuration file

I just know the solution above, but I dont know the reason, I google this issue and find the url below

http://forums.zend.com/viewtopic.php?f=69&t=1832

It gives me more details about this issue, but I still didn't find the reason, so any explaination for it will be appreciated.

原文地址:https://www.cnblogs.com/wildboar/p/2125581.html