Configuring Drush on OS X Lion and MAMP 2.0
Today I finally decided to install Drush on my MacBook Air and everything was going great using pear to install Drush until I ran into the error: No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) [warning] environment.inc:518
Luckily it's an easy fix. Simply create a symbolic link in /var/mysql to /Applications/MAMP/tmp/mysql/mysql.sock with the following code.
sudo mkdir /var/mysql sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /var/mysql/mysql.sock
And your done.