Database connection "Mysql" is missing and mysql.sock is missing

MAMP is strange when it comes to mysql. Chances are you need to set up a symbolic link so it knows where to find it. Something like:

sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /tmp/mysql.sock


After searching and trying a lot of things I finally managed to solve my problem. The answer Chuck Burgess given above could solve the problem, but my scenario was little different that I wasn't able to see mysql.sock file at:

    /Applications/MAMP/tmp/mysql/mysql.sock

I thought my mysql.sock was missing but actually it was there and hidden (THAT's STRANGE! I WENT TO THAT FOLDER using CLI AND SAW THAT). I'm using MAC and files starting with '.' are usually HIDDEN but don't know why mysql.sock was hidden so what I did is in my database configuration file I added 1 parameter (unix_socket) and my problem was solved.

   'unix_socket' => '/Applications/MAMP/tmp/mysql/mysql.sock'