tags:

views:

531

answers:

2

I've had a lot of problems trying to get MySQL installed on my Mac, so I caved and installed MAMP.

MAMP sets its versions of Apache and MySQL to use ports 8888 and 8889. A lot of the MAMP tutorials (such as this one) mention that you should set MAMP's Apache and MySQL ports to their defaults of 80 and 3306, but they don't mention why (besides http://localhost:8888/ becoming http://localhost).

Apache and MySQL seem to start fine using MAMP's defaults, and I am able to get Apache to start under port 80, but MySQL won't start when I try to set it to port 3306. I think this has something to do with a phantom installation of MySQL that I tried to install and scrapped (but I could be wrong).

Do you foresee problems with the fact that I may be running a phantom instance of MySQL, or is this a separate issue? Will it be important to set MySQL to run under 3306, or should I just leave it at 8889 and move on?

+1  A: 

You can just leave it on 8889. Important thing is that in your connection string you specify new mysql port, so php will know where it has to connect

Alekc
+1 for reminding me that I needed to specify the socket
Andrew
A: 

Any server application can run on any port.

The caveats are:

  1. Running on a port < 1024 requires that you have root privilege
  2. Client configuration will need updating if the port used is "non-standard". Running on the standard port normally allows the port field to be omitted
  3. SOHO Firewalls may have limits on the number of custom "services" that may be configured, but usually have a decent list of known services
Alnitak