MAMP issue.

Discussion in 'Web Design and Development' started by JakeGWood, Jul 12, 2011.

  1. JakeGWood macrumors newbie

    Jul 3, 2011
    I just started learning MySQL and PHP and am using MAMP. My book (O'Reilly, PHP, MySQL and JScript) recommended that I switch the default ports to 80 and 3306 for apache and MySQL. However, when I did that, on the startup menu for MAMP the status box gives the green light for the Apache server, but red light for the MySQL. I tried switching back to 8888 and 8889, MAMP's defaults, but no luck, and I did have two green lights before.

    Any ideas? Thanks
  2. JakeGWood thread starter macrumors newbie

    Jul 3, 2011
    I just downloaded XAMPP and it also can't access the MySQL server. It says XAMPP MySQL can't run while another MySQL is running. Even if I quit MAMP, whose MySQL isn't working anyway, it still gives me the same error.
  3. angelwatt Moderator emeritus


    Aug 16, 2005
    Sounds like the MySQL process is stuck. Logging out and back in may help or rebooting.
  4. JakeGWood thread starter macrumors newbie

    Jul 3, 2011
    Yeah, that worked, but it seems like every time I quit MAMP and then open it back up, the MySQL won't start back up and have I have to log out/in again in order for it to do say, so it's habitual problem. Any ideas where it may lie?
  5. angelwatt Moderator emeritus


    Aug 16, 2005
    I recommend looking at the MySQL log (/Applications/MAMP/logs/) and the Console app (/Applications/Utilities/Console), especially when quitting.
  6. rufhausen macrumors regular

    Jul 5, 2007
    Littleton, CO
    With respect to port 80, are you sure you are not conflicting with another process (built-in Apache) running on that port?
    Is Web Sharing turned on under Settings|Sharing?

    Even though 80 and 3306 are the Apache/Mysql default ports, I've found that it's easier to just to use the MAMP port defaults instead because it eliminates conflicts and it doesn't require entering your administrator password every time you start up.

    In fact, I avoid the MAMP GUI altogether and create symbolic links to all the start/stop shell scripts from the MAMP folder to my home folder and just control things via the terminal.

    The only time using the MAMP default ports is an issue is when you hard code the port number into your application code and move environments. This can be addressed easily with some simple if/else logic.
  7. HomeBru Studios macrumors member

    HomeBru Studios

    Jun 4, 2008
  8. JakeGWood thread starter macrumors newbie

    Jul 3, 2011
    Where would I find this info?

    Any good tutorials for this? Overall, I need a way better understanding of the terminal and UNIX. Any good and thorough tutorials for not only terminal use but what it means in terms of the system itself? A lot of the ones a find are for pretty basic file management tasks, or just overall not that insightful.
  9. turbobass macrumors 6502

    May 25, 2010
    Los Angeles
    Funny I just got done recommending MAMP in another thread saying how reliable it is, etc. ;)

    There have been a few times however when the MySQL locks up. 99% of the time you can just restart your computer.

    Or if you want to get fancy pants:

    Open the terminal.

    killall -9 mysqld
    If that doesn't work you're probably boned ... delete and reinstall MAMP. You should always be backing up your SQL database FYI...
  10. DaReal_Dionysus macrumors regular


    Jan 9, 2009
    I have been using MAMP for years and have several tutorials under my former handle and think you need to understand how MAMP works so i will explain.

    MAMP's configuration is unique and I would not recommend changing any off the settings at all. OS X comes with apache pre-installed and MAMP sets up another apache server but in a separate location that becomes the default for MAMP.

    Where it can get tricky is defining the site, this is where most people go wrong. I did a video tutorial on MAMP installation and defining the site properly at this

    Please view the VTM and you will learn how this will work for you. I would recommend installing MAMP completely and follow the VTM.

    Hope this helps.

Share This Page