Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

auxiliaryjoel

macrumors newbie
Original poster
Feb 13, 2019
3
1
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:

/Applications/MAMP/Library/bin/mysql
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.

UPDATE:
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.
 
Last edited:
  • Like
Reactions: basher
Just as a suggestion, stop using MAMP and try Laravel Valet https://laravel.com/docs/5.7/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.
 
Just as a suggestion, stop using MAMP and try Laravel Valet https://laravel.com/docs/5.7/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.

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)?
 
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.
 
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:

/Applications/MAMP/Library/bin/mysql
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.

UPDATE:
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.

Good to read you found a fix. What version of MAMP are you running?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.