MYSQL no longer running (MAMP)

Discussion in 'Mac Programming' started by auxiliaryjoel, Feb 13, 2019.

  1. auxiliaryjoel, Feb 13, 2019
    Last edited: Feb 13, 2019

    auxiliaryjoel macrumors newbie

    Feb 13, 2019
    Up until today MYSQL was working OK for months with 2 MAMP Drupal localhost builds. But now MYSQL no longer loads.

    When opening MAMP the Apache Server starts, whereas the MYSQL Server does not start.

    This means the "Open WebStart page" option is greyed over and the Drupal path that would normally load the site just displays an error.

    Using Terminal, if I run:

    which mysql
    the response is:

    But if I try to login into MYSQL via Terminal:

    mysql -u (myuser) -p
    I am prompted for the password, but after entering correct password I receive:

    ERROR 2002 (HY000): Can't connect to local MySQL server through socket
    '/Applications/MAMP/tmp/mysql/mysql.sock' (2)
    I checked that path, and there is no mysql.sock file there. In that directory there is just one file titled .dummy that has no content in it.

    Some forums relating to the same error suggest I check and stop any other running MYSQL instances, but I don't appear to have any.

    For example I ran:

    ps -ef | grep mysql
    And I just receive this:

    501 11212 10699 0 12:31pm ttys000 0:00.00 grep mysql
    I don't entirely understand that response, but it looks like there is nothing running that I can 'kill'.

    Also, if I try things like:

    sudo service mysql start
    I am prompted for my Mac user password, which I enter, but I am then given the error:

    sudo: service: command not found
    Any help here would be greatly appreciated.

    Found a solution!
    It turns out that there were files and sub-directories missing from my MAMP/db/mysql57 folder.
    I have no idea where they went! But I found a backup I made a few days prior that contained them all, so I pasted them back in and now everything (MYSQL, drush, MAMP and Drupal) are all working Ok again.
  2. LeeW macrumors 6502a


    Feb 5, 2017
    Glasgow, Scotland
    Just as a suggestion, stop using MAMP and try Laravel Valet

    It is a standalone package, easy to install, update and provides a lot more flexibility than MAMP. Although it was created as part of the Laravel PHP framework you do not need to use it all.
  3. auxiliaryjoel thread starter macrumors newbie

    Feb 13, 2019
    oh interesting @LeeW
    have you been using Laravel Valet long? And any idea if it gels with Drupal just as easy as it does with Wordpress (for example)?
  4. LeeW macrumors 6502a


    Feb 5, 2017
    Glasgow, Scotland
    I have been using it since it was launched in place of Mamp, yes it will work fine with drupal, wordpress and many others. I am sure there is a list of apps on the valet page.
  5. basher macrumors 6502


    May 27, 2011
    Glendale, AZ USA
    Good to read you found a fix. What version of MAMP are you running?
  6. auxiliaryjoel thread starter macrumors newbie

    Feb 13, 2019
    At the time I posted that I was probably on the previous version, but currently running: 5.2 (free Version not the Pro version)

Share This Page

5 February 13, 2019