

Regarding the first problem (Apache Port in use by another program), I opened up Terminal and > sudo lsof -i -P | grep -i "listen" to see which ports would show up. But, when I tried to log into the site with a dummy user account I received a “SQLSTATE Can’t connect to local MySQL server through socket ‘ /Applications/MAMP/tmp/mysql/mysql.sock’ (2)” message.

I opened Chrome and entered the url of a site I’m developing locally and it showed up with no problem. I clicked ‘Start Servers’ again and got a message stating, “Apache couldn’t be started because port 8888 is in use by some other software.” Weird since I haven’t made any changes to the system or application, or installed any updates. But everything is not lost.After restarting MAMP, I noticed the MySQL Server checkbox didn’t turn green as it usually does.
MAMP FOR MAC PORT 8888 ALREADY IN USE MAC OS
There seems to be no way to get the same kind of info using netstat on Mac OS X. Also there is no -t parameter but it can be done using -ptcp. Actually on Mac OS X, the -p parameter of netstat doesn’t mean program or process but protocol.
MAMP FOR MAC PORT 8888 ALREADY IN USE MAC OS X
Somehow I’ve only noticed now that netstat on Mac OS X cannot show the program name. -p: show the program name / PID owning the socket.

I want to see the ports and the programs listening on these ports. When checking the listening ports on my Linux machine I put netstat some pants on: # netstat -pant | grep LISTEN
