Mamp servers won't start it seems apache will but mysql won't. I really have no idea what I need to do to resolve this. Please help.
4 Answers
Something similar happened to me, I hope that what has helped me, will also help you.
I just upgraded MAMP from 4.06 to 4.1, and, mysteriously, it has suddenly stopped working access to phphMyAdmin, with this error:
#2002 - No such file or directory - The server is not responding (or the local server's socket is not correctly configured).
After much reading and testing, this has finally been the answer that has worked for me: phpmyadmin - error 2002 - on Mac
Steps:
Locate
config.inc.php
file. You can find it in/Applications/MAMP/bin/phpMyAdmin
Edit it, using some text editor (Sublime 2, TextEdit, Text Wrangler,...)
Locate this text:
$cfg['Servers'][$i]['host'] = 'localhost';
Replace
localhost
with127.0.0.1
$cfg['Servers'][$i]['host'] = '127.0.0.1';
Save it and close.
Restart servers (or stop and start), or just start them.
Try to access to phpMyAdmin.
It has worked for me, I hope for you too.

- 1
- 1

- 121
- 2
-
Thanks! It works! Do you know why it worked and then stopped? What triggered that? – christostsang Feb 23 '17 at 21:56
-
I've tried all these steps but still got the same error in MAMP, I've resolved many times through these steps in XAMPP. Wonder why it's not working yet. – Kamran Allana Jan 13 '23 at 11:28
Simply remove two files ib_logfile0 and ib_logfile1 from /Applications/MAMP/db/mysql56

- 1,364
- 16
- 14
-
1
-
1The above solution fixed everything after restarting MAMP. Some solutions are for when sql does start up. This one fixed my issues of the sql checkbox not lighting up green and giving the error 2002. – 6754534367 Mar 17 '20 at 11:55
I researched and found 2 (rather 3) solutions for this particular issue wherein Apache would start but MySQl would not. They were 1. Changing localhost to 127.0.0.1 2. Renaming the ib_logfile# to ib_logfile_# 3. Killing existing mysqld process
While none of the above approaches worked; what worked instead was the following
Surprisingly when MAMP was installed, it did not create mysql_error_log.err file under /Applications/MAMP/logs folder. I created this file under the same directory and MySQL service turned green in MAMP window. I found this file missing when I was attempting to start MySQL service directly using the bash script 'startMysql.sh' inside /Applications/MAMP/bin

- 21
- 2
Can add another cause to the problem. Since all other answers did not work for me, I took a further look into mysql_error_log.err
file at /Applications/MAMP/logs
folder and found the following:
[ERROR] Another process with pid 1083 is using unix socket file.
[ERROR] Unable to setup unix socket lock file.
[ERROR] Aborting
So my guess is, that somehow there was an old process of mysql stuck while shutting down the server.
Restarting my mac solved the problem, but it should also work if you kill the named process (in my case pid 1083) with:
sudo kill -1083 PID

- 1,357
- 1
- 10
- 22