Drush + MAMP on Mac
If you get the "need a higher bootstrap" error on the mac command line AND you are using MAMP, AND your site is working just fine in the browser (http://yoursite.localhost) then the problem is drush using the wrong PHP
One quickfix is just to use a symlink:
sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /var/mysql/mysql.sock
Use the PHP version of MAMP
Before starting, we need to see what PHP version MAMP uses. To see that, open MAMP, click on Preferences and then PHP. In my case, PHP version 5.6.2 is used.
When we work with MAMP, we want to use the php version of MAMP, not the system version. Therefore, first check the PHP version in use by typing this command into Terminal:
which php
Normally you will receive the output /usr/bin/php.
We want to use the version under /Applications/MAMP/bin/php/php5.6.2/bin/php.
To change this, we have to edit the profile with root (sudo) access. Type:
sudo nano ~/.bash_profile
Now add the following line:
export PATH=/Applications/MAMP/bin/php/php5.6.2/bin:$PATH\
Then click CTRL + X, then Y and Enter. In order to see the changes we have to reload the file with the profile we just changed:
source ~/.bash_profile