---
layout: post
title: Start MAMP on login without any ugly hacks
author: Steven
date: 2010-03-24 12:00:26
categories:
- Musings
tags:
- os x
- software
featured_image: https://www.stevenjaycohen.com/wp-content/uploads/2016/07/wsi-imageoptim-happy-mac-icon.png
---
Running MAMP on standard ports (80 for Apache and 3306 for mySQL) makes MAMP ask for a password on each start up. I would like MAMP to start automatically when I log in without requiring a password.

There are a few ways to do this posted around the web, but they all involve hacking MAMP in one way or another. There is an alternative. Create the following AppleScript:
do shell script "/Applications/MAMP/bin/startApache.sh &" password "YOURPASSWORD" user name "YOURUSERNAME" with administrator privileges
do shell script "/Applications/MAMP/bin/startmySQL.sh > /dev/null 2>&1"
Save it as a run-only application (to keep anyone from being able to open the script and read your password*). Then, add this script to your login items. That's it, you're done!

* As noted below, this is not secure. And, all attempts to make it secure result in a dialog box being displayed. So, either use this insecure script, or remember to start MAMP manually. I apologize for my mistake.