I am cloning a drupal site from github and I am using acquia dev desktop.
Whenever i first clone a site, the site is able to work just fine. However whenever i seem to do something with git - like fetch a new branch or add a remote, or something like that I start to get this error:
![PDOException: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in lock_may_be_available() (line 167 of /Applications/MAMP/htdocs/global.ny.gov/docroot/includes/lock.inc).]1
This was not happening until recently. Im not sure if this is a git problem, a local disk memory problem, or perhaps a settins.php problem that occurs when i checkout other branches? I have been workin on this issue for like 2 days now and none of the suggested solutions on drupal's forum seem to be working from me. Further than that - most answers on the drupal site are from like 5 years ago.
The problem first occurred when i cloned multiple Drupal sites on my machine. I have a MAC. Any idea as to why this randomly happens?
127.0.0.1 mysite.dd
in /etc/hosts