Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change Ports in MAMP and Apache won't start (Mac)

Tags:

mysql

apache

mamp

I am using MAMP 3.2.1 on Mac OS X 10.9.5 and trying to change my Ports so I can go to localhost/... instead of localhost:8888/... in my browser.

When I go to change the ports in Preferences the option I have is "Set Web & MySQL ports to 80 & 3306", however when I do this, the Apache server does not restart.

I have seen other posts that say rename envvars to __envvars but mine is called envvars_ so I'm guessing that's irrelevant.

Any suggestions?

like image 585
Meemio Avatar asked Apr 20 '15 16:04

Meemio


2 Answers

This is rather older post but I faced the same issue today. As it turned out there was already one more Apache running on port 80 and was clashing with the new MAMP port setup. Hopefully this will help you:

  1. Setup ports to 80 (Apache), 81 (nginx) and 3306 (mysql) in your MAMP configuration.
  2. Quit your MAMP
  3. From CLI type sudo apachectl stop
  4. From CLI type ps -A | grep httpd and you shouldn't see any running process (apart from your grep)
  5. Start your MAMP (at this point MAMP should start Apache since 80 port is not in use)
like image 58
David Jirman Avatar answered Oct 10 '22 23:10

David Jirman


You can follow the instruction bellow, it worked for me.

1.Open Activity Monitor program and select "All Processes"
2.Search for "mysqld" in the search area. You might see an example of mysql running
3.hit quit process.
4.Restart MAMP and it will fix all.

like image 34
Shahin Alam Avatar answered Oct 10 '22 21:10

Shahin Alam