First you must upgrade to mysql 5.6. Download the archive from their official blog. Unzip it an run it. It will update your mysql server to 5.6.

Chose a supported php version in mamp, preferably php7. Then open your php.ini file (File -> Edit Template -> your php version) and change this value always_populate_raw_post_data to -1.

In your terminal open your bash profile (sudo nano ~/.bash_profile) and add this:

1
2
PHP_VERSION=`ls /Applications/MAMP/bin/php/ | sort -n | tail -1`
export PATH=/Applications/MAMP/bin/php/${PHP_VERSION}/bin:$PATH

Now type source ~/.bash_profile to refresh your bash profile. If you check your php version in the command line: which php followed by php -v you should get the mamp php and the same php version that you have in your mamp. It is necessary to have the same php that runs in the command line and in the webserver.

You can install magento2 now with your preferred method.

Once this is ok you can proceed to set up the crons. Put a file in your root server folder with phpinfo() and render it in the browser. There you can see 3 lines that you need: USER, Loaded Configuration File, memory_limit. Now we run sudo crontab -u USER -e and insert our crons (change it to your setup):

1
2
3
*/1 * * * * /Applications/MAMP/bin/php/php7.0.0/bin/php -c /Library/Application\ Support/appsolute/MAMP\ PRO/conf/php.ini /Users/magento-2/bin/magento cron:run >> /Users/magento-2/var/log/setup.cron.log&
*/1 * * * * /Applications/MAMP/bin/php/php7.0.0/bin/php -c /Library/Application\ Support/appsolute/MAMP\ PRO/conf/php.ini /Users/magento-2/update/cron.php >> /Users/magento-2/var/log/setup.cron.log&
*/1 * * * * /Applications/MAMP/bin/php/php7.0.0/bin/php -c /Library/Application\ Support/appsolute/MAMP\ PRO/conf/php.ini /Users/magento-2/bin/magento setup:cron:run >> /Users/magento-2/var/log/setup.cron.log&

/Library/Application\ Support/appsolute/MAMP\ PRO/conf/php.ini is my Loaded Configuration File. /Users/magento-2/ is the path to my magento root. Change it to yours. /Applications/MAMP/bin/php/php7.0.0/bin/php is php7. Change it to your version if necessary.

To make sure everything runs ok you have to check var/log/setup.cron.log and see Ran jobs by schedule.

In your magento .htaccess change the memory_limit to 2G.

Note that if you are upgrading from magento 2.0.0 there is a bug for php7 that will not let you upgrade and it will not detect your crons. You have to apply the patch and run the resolution 1.

If you get this error in your mamp php logs: PHP Fatal error: require_once(): Failed opening required ‘/public_html/magento2/update/vendor/autoload.php’ you must run composer install within the update folder.

More information about the crons here.