Resetting a locked MAMP
If MAMP or OS X crashes, it can leave MAMP in a locked state where, when you restart it, it shows Apache and MySQL as running when they really are not. Clicking the Start/Stop Servers button will have no effect.
The problem is that MAMP stores the process ID of the running servers in .pid files inside the MAMP application bundle. If it crashes, it can't always remove these files. When it restarts, it finds the .pid files and thinks that the servers are running at the process IDs contained therein.
The fix is simple: for Apache, delete the httpd.pid file in MAMP/Library/logs/ and for MySQL, delete the mysql.pid file in MAMP/tmp/mysql/.
If MySQL still refuses to start up, check that the process isn't still running.
If this is the case, your mysql_error_log file in MAMP/Logs may show you errors similar to:
InnoDB: Unable to lock ./ibdata1, error: 35 InnoDB: Check that you do not already have another mysqld process InnoDB: using the same InnoDB data or log files.
Run: top
and check to see if there is a mysqld process running. If there is, note its PID (e.g., 16320) and kill it:
kill -9 16320
Now, restart the servers in MAMP and everything should start working as before.
Comments
by Melvyn on 2009-01-26 18:53:10
by Todd Rothe on 2009-01-27 00:24:57
by Frederik Jacques on 2009-01-28 12:27:49
by Rolle on 2009-01-26 16:40:12
by Jason Campbell on 2009-07-14 17:32:54
by David Needham on 2009-10-07 04:04:14
by David Needham on 2009-09-28 15:42:45
by Dan Gayle on 2010-07-12 19:21:27
by bob on 2011-07-18 22:44:32
by Antony Wu on 2011-07-27 03:11:17
by marco on 2011-08-20 21:12:11
by Peter on 2011-08-30 15:50:00
by Ian on 2011-09-17 16:52:34
InnoDB: Unable to lock ./ibdata1, error: 35 InnoDB: Check that you do not already have another mysqld process InnoDB: using the same InnoDB data or log files.
by David Casillas on 2011-12-23 12:39:29
by Darius Kruythoff on 2011-09-20 20:15:05
by Jon Elliman on 2011-10-27 11:57:10
by Sitebase on 2011-12-07 09:06:20
by elixir on 2012-01-05 12:27:27
by zach on 2012-03-25 17:55:23
by edwin on 2012-03-14 20:29:14
by Jake on 2012-04-21 17:19:56
by Jens Melander on 2012-04-10 15:19:28
by Marcelo on 2012-06-27 13:17:43