WorkHabit Blogs
WORKHABIT LABSFixing MAMP after an abrubt reboot
So say you’re plugging along, developing like a madman (or woman), and, as can happen, your system needs a hard reboot.
It can happen. It’s rare. Months will go by for most people without a crash. But when it does, well, MAMP doesn’t like to play nice anymore.
The specific case that can happen:
- You boot your system.
- You open komodo and resume your project
- You make a couple changes, open a browser, and realize you forgot to start MAMP.
- You open it up, and it shows a green light for both apache and mysql, but when it opens the browser to its test page, you get a server not found.
This is because MAMP already thinks it’s running. You can click “Stop servers” and it will spin for about a third of a second, then happily proclaim “I’m up! Yaay!”
Not likely, I’m afraid.
The problem here is that MAMP still thinks that the processes still exist from before you had to reboot.
But there’s an easy fix:
Open terminal (or iterm, or whatever your flavor):
cd /Applications/MAMP/tmp/mysql/
rm mysql.pid
cd /Applications/MAMP/Library/logs/
rm httpd.pid
If you now go back to MAMP’s control panel, you’ll note that it sees both Apache and MySQL are stopped. Go ahead and click “Start Servers” and continue on your merry way.
You are now free to move about your development server.



Yet another way
You can also fix this by clicking “preferences” on the mamp control-panel/window and then clicking “Ok”. You don’t need to change anything else - just clicking “Ok” is enough to make MAMP right itself again. :-)
Thanks
You just saved me this morning lol. Thanks a bunch.
Post new comment