Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MAMP mysql server won't start. No mysql processes are running

Tags:

mysql

mamp

My MAMP mysql server won't start. All of the suggestions I've seen on the web say to check for other mysqld processes running and kill them if they exist, and that it should fix the problem, but it has not for me.

Here's the error log:

130415 13:42:12 mysqld_safe Starting mysqld daemon with databases from /Library/Application Support/appsolute/MAMP PRO/db/mysql
130415 13:42:12 [Warning] Setting lower_case_table_names=2 because file system for /Library/Application Support/appsolute/MAMP PRO/db/mysql/ is case insensitive
130415 13:42:12 [Note] Plugin 'FEDERATED' is disabled.
130415 13:42:12 InnoDB: The InnoDB memory heap is disabled
130415 13:42:12 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130415 13:42:12 InnoDB: Compressed tables use zlib 1.2.3
130415 13:42:12 InnoDB: Initializing buffer pool, size = 128.0M
130415 13:42:12 InnoDB: Completed initialization of buffer pool
130415 13:42:12 InnoDB: highest supported file format is Barracuda.
130415 13:42:13  InnoDB: Waiting for the background threads to start
130415 13:42:14 InnoDB: 1.1.8 started; log sequence number 1707549
130415 13:42:14 [Note] Event Scheduler: Loaded 0 events
130415 13:42:14 [Note] /Applications/MAMP/Library/bin/mysqld: ready for connections.
Version: '5.5.25'  socket: '/Applications/MAMP/tmp/mysql/mysql.sock'  port: 0  Source distribution

It looks like the connection is open to me, but MAMP stil errors out with this message: "MySQL wasn't able to start. Please check log for more information."

Any suggestions?

like image 603
jordancooperman Avatar asked Apr 15 '13 17:04

jordancooperman


People also ask

Why MySQL server is not starting in MAMP?

The issue is usually due to another MySQL service running on the same port. The easiest solution is to kill all MySQL processes and restart MAMP. On macOS, you can do this using the Activity Monitor, which you'll find in the Utilities folder on your computer.

What to do if MySQL server is not running?

Try manually start the service from Windows services, Start -> cmd.exe -> services. msc. Also try to configure the MySQL server to run on another port and try starting it again. Change the my.

How do I start MySQL with MAMP?

Step 1: Start MAMP which will display this window. Click on the middle button to bring up the Start Page. Step 2: The mac and PC version of this page may look different but both have the same link under the MySQL section in the middle. Click on the link for phpMyAdmin.


3 Answers

What worked for me was removing all files (but not directories) in the mysql dir.

Edit #2 As per answers below, you only need to delete the log files: [ib_logfile0, ib_logfile1]

So quit MAMP and then in the terminal:

rm /Applications/MAMP/db/mysql/ib_logfile* #(or wherever your MAMP is installed)

Edit!: A few people have mentioned that you may want to back up these files first in case anything goes wrong, so maybe just use mv instead:

mv /Applications/MAMP/db/mysql/*  /tmp/.

If this doesn't work go back and kill all processes: sudo killall -9 mysqld

This is also duplicated here: mysql server won't start MAMP

like image 179
Eric Grotke Avatar answered Oct 14 '22 00:10

Eric Grotke


The easiest solution: quit MAMP and remove the log files from MAMP/db/mysql directory [ib_logfile0, ib_logfile1] and restart MAMP. For more visit http://juanfra.me/2013/01/mysql-not-starting-mamp-fix/

like image 86
user3127648 Avatar answered Oct 14 '22 01:10

user3127648


Since none of the answers here solved my particular issue, I should probably add my own solution to to the list.

I had to hard reset my computer while MAMP was still running. This sometimes leads to a problem where, after restarting the machine, MAMP can start the Apache Server, but can not start the MySQL server for some reason.

My solution for this issue was to:

  • Close MAMP
  • Go to Applications/MAMP/tmp/mysql
  • delete the file mysql.sock.lock
  • Restart MAMP
like image 29
ksav Avatar answered Oct 13 '22 23:10

ksav