If you use MAMP for your local web development with Apache running on port 80 you will find that it shows a password prompt every time you run it. It’s annoying to say the least.
Fortunately there is a way around this. I’ve put together a small app that runs Apache & MySQL from MAMP without asking for a password each time. It’s quite secure because it uses a stored password locked in the Keychain. It also quits Apache & MySQL when you quit the app itself.
Here is how to use it:
- Open the Keychain Access app and click ‘+’ to add a new item. Call the item ‘MAMP’ and enter the account name and password that you use to log in to your Mac.
- Download and launch the MAMP No Password app
Release 1.1 updates (20th March 2013):
- Added a dock icon menu to restart Apache and MySQL.
- Changed the name of the app to MAMP No Password.
- Added compatibility with OS X 10.7 and newer (thanks @robwierzbowski and Steve @ Tech Otaku)
[...] I could add to my dock. It works! One less daily annoyance in my life! Damian Gaweda has posted a more elegant solution that’s worth checking [...]
[...] will ask you for you password every time you run it (annoying). Fortunately you can avoid that by running this app I wrote, which stores MAMPs password in your [...]
this is great!!! could only be better if it didnt even show up on the dock!
Heh. I like to see when MAMP is running and be able to kill it when necessary, hence the icon.
There is a little trick you can do about it.
1) Go to Applications (or wherever you put it) and find the MAMP No Password app.
2) Control-click it and select Show Package Contents
3) Find the Info.plist file and open it (with Xcode for instance)
4) Add a new line ‘Application is agent (UIElement)’ and set it to YES
5) Save and close the file, then start the app – it will not show in the dock.
Although you should bare in mind that if you have a nice little option when you control-click the dock icon, which is: Restart Apache & MySQL – that by itself may worth to keep looking at the icon in the dock, but it depends on your preferences.
And last but not for the least: a big thank you to Damian!
This solution ‘just works’. Thanks for wrapping it up in a nice little package.
I just setup a new development box and this was exactly what I needed.
So, what exactly happens when I launch your app? Should I store your app somewhere and run it each time I want to run MAMP or is it a one-time executable that can be deleted after i’ve run it.
Is it for instance possible to autoload MAMP (obviously without the password-prompt) on startup with this app?
Questions, questions, questions… Thanks for sorting things out!
You should put the app in your Applications folder and run it whenever you want to use MAMP. You can also put it in your Login Items under your account in System Preferences to launch it on startup.
Alright! Thanks so far. But it still prompts on powering off right?
Nope. Just right-click the Apache icon from the dock and quit. This will close Apache and MySQL.
Excellent app. Sure removes one big headache!
Many many thanks!
This is great but it doesn’t seem to work with MAMP PRO?
Have Googled for any solutions for MAMP PRO and no one seems to be dealing with MAMP PRO and this password issue. Any suggestions on how to get this working for MAMP PRO?
[...] Damian from 46palermo has a more convenient solution, Which can be found over here. [...]
Thanks for the great app. Otherwise works as expected on my OS X 10.5 but it does not quit. Always have to Force quit, which is becoming quite annoying. I would appreciate if you could help me out with this, or see if it has to do with your software and maybe fix it. Thanks.
Btw, when I try to quit, it seems it stops apache but not mysql. Maybe that has something to do with it…
dude, this app is pretty awesome, and your instructions very clear. I took the whole thing one step closer & broke the script in half. That way i don’t need to keep the app “running” and clogging up my cmd+tab space and dock. I then rolled that script into an automator script that opens it along with my text editor, browser & development folders. If anyone’s interested, you can get the file here: Open_MAMP_(No_Password).zip
Oops, the link i provided obviously isn’t a link! try this: https://dsgnwrks.pro/download-stuff/Open_MAMP_(No_Password).zip
Very nice app! A lot of thanks!
I introduced it in my Blog(Japanese).
Has anybody tried the script provided by Justin?
How can i open the source of this script?
I like to see what a script is doing.
And maybe change it to my needs.
Hey Erik. If you open automator and then to a “file > open” you can open that automator app & see the applescript. Hope that helps.
Thanks a million times! I have been waiting for an app like this for AGES!
No more logging in and having to type my password 3 times!! Sweet!
This works, but now each time I start the computer “security wants to use your keychain” is popped up and the network is unavailable until I enter the password.
Using Snow Leopard.
Turns out this was a multiple keychain issue – the password dialogue no longer appears.
However, if anyone had thoughts on the possibility of this app preventing immediate access to the internet when set as a login item, that’d be helpful.
Thanks for the app though!
Just wanted to say – this is absolutely fantastic. Thanks so much.
One thing of note… Don’t put the MAMP entry in your System keychain. Create a new keychain. I called mine Apps, and moved my MAMP key into that. After that, no more “system” keychain login dialogs!
Thanks for creating this little app!
Works like a charm! Muchas Gracias =)
If you don’t want to icon to show up in the dock, you can hide it with a free app called Dock Dodger. It’ll still run in the background and is visible with activity monitor.
I’ve been using this app for years and it has been awesome. So excited to come here & find there’s been an update adding even more functionality. Thanks Damian, no doubt legions of Mac devs are forever in your debt!
This still works well with MAMP 2.1.3 in OSX 10.8. Thank you Damian!