i am working on drupal 7.x and i am new in drupal and getting the error while getting the project from my senior and install it in www folder when i click the project from localhost i am getting the error:

PDOException: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in lock_may_be_available() (line 165 of /home/content/77/7614677/html/.domains/demo-client.geniusanywhere.com/sgspacific/includes/lock.inc).

plz help me..............

Comments

I encountered this error when moving my localhost site to my remote server. The admin system was still looking for its files in the cached location (at the localhost location, which had a different top-level folder name, instead of the server). Since the files it expected weren't there, it coughed up this error.

The problem would be the reverse in this case, but flushing the caches will fix it either way.

Eric

This happened to me, seemingly randomly, and all it took to fix was a quick flush of the browser's cache!
Great work Eric,

cheers