jordancooperman
jordancooperman

Reputation: 2011

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

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?

Upvotes: 49

Views: 151505

Answers (28)

ksav
ksav

Reputation: 20830

None of the existing answers solved my issue.

I had to hard reset my computer while MAMP was still running. This sometimes leads to a problem where, after restarting the computer, 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
  • Open MAMP

Upvotes: 37

Rinkal Jasani
Rinkal Jasani

Reputation: 598

I have mac system and my mamp does not start properly. Just restart my system and then start mamp again then it's working properly

Upvotes: 0

Hadi Yahia
Hadi Yahia

Reputation: 48

This is what worked for me (Windows 10) :

  1. Click on Start Servers in MAMP
  2. Manually click on mysql.exe in MAMP installation folder (C:\MAMP\bin\mysql\bin\mysql.exe)

Tip : You can pin mysql.exe to Start Menu so you don't always have to search for this folder

Upvotes: 1

Didierh
Didierh

Reputation: 374

If you are using MAMP PRO 5.7+ (18029)

1.Just stop MAMPRO. 2.Goto to directory /Applications/MAMP/db/mysql## (Where ## is the Number of your Mysql version) 3.List the files with command: ls -l * 4. Type command: rm ib_logfile* #Just must delete theses 2 files. 5.Restart MAMPRO and its must works fine!

Caution: If you remove the files ibdata1 will destroy all you "databases"

Upvotes: 1

David Jirman
David Jirman

Reputation: 1216

None of the above answers worked for me (I did MAMP upgrade to latest 5.7 on MacOS).

After a while of digging through the error log (/Applications/MAMP/logs/mysql_error_log.err) i found out that there's an error [ERROR] unknown variable 'thread_concurrency=8'] that causes termination.

Based on a post about upgrades i removed the directive from my.cnf and restarted MAMP. All worked well afterwards (was prompted to upgrade DBs, etc.)

Upvotes: 2

mateostabio
mateostabio

Reputation: 1028

I just ran this in terminal: sudo killall -9 mysqld and then I force quit MAMP. Reopen Mamp and everything works perfectly.

Sometimes, just turning off and restarting your computer does the trick.

Upvotes: 2

MR_AMDEV
MR_AMDEV

Reputation: 1942

I was running MAMP 4.1 on windows and MYSQL 5.7 .Was having this problem many times and found out a fix for this: For me deleting the log files was not working then just delete

  • mysql-bin.index
  • YOUR_PC_NAME.pid

and boom it starts working again. If this also doesn't work for your, remember to delete each file one by one and keep checking if any works for you. Make sure to backup always.

Upvotes: 2

qjk
qjk

Reputation: 81

Best way to find the real cause is to check the MAMP error log in MAMP > logs > mysql_error_log.err

I found the ERROR "Do you already have another mysql server running on port: 3306 ?" - which was actually the cause for my MAMP MYSQL not starting.

Port 3306 was already "busy", so I have changed it to 8306 and that solved my issue.

Upvotes: 2

Most of the answers here are offering to delete random files.

Most of the time, this is the worst thing to do especially if it is important for you to keep the integrity of your development environment.

As explained in the log file, if this problem is not related to a read access permission nor to a file you deleted in your mysql then the only solution is to:

Open your my.conf file from the File menu in MAMP (File > Edit Template > MySQL)

Find and edit this line to be: innodb_force_recovery = 1

Save with ctrl+S

MAMP will offer you to restart your servers

Go back building the next unicorn :)

Upvotes: 10

Chris
Chris

Reputation: 459

For me the line innodb_additional_mem_pool_size in my.cnf was causing it

Upvotes: 1

Sébastien Gicquel
Sébastien Gicquel

Reputation: 4386

I’ve seen on different answers that we have to remove ib_logfile0 and ib_logfile1 in Applications/MAMP/db/mysql56/

If you use MAMP PRO 4, these files are in /Library/Application Support/appsolute/MAMP PRO/db/mysql56/

Removing theses fils works for me (the serveur doesn’t start after a system crash).

Upvotes: 3

Manish Shrivastava
Manish Shrivastava

Reputation: 32050

Just type below command in terminal:

rm /Applications/MAMP/db/mysql56/ib_logfile* 

and then restart the MAMP.

It works back perfectly.

Upvotes: 7

Eric Grotke
Eric Grotke

Reputation: 5145

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

Upvotes: 147

Leo
Leo

Reputation: 1505

I had to do a combination of things. First I had to change the permissions on my mysql directory. applications/MAMP/db/mysql56/mysql see Stackoverflow here

If that doesn't work add in a my.cnf file to applications/MAMP/conf folder with the following

[mysqld]
innodb_force_recovery = 1

see Adel 'Sean' Helal . answer

This is what ended up working for me.

Upvotes: 6

Valter Lee
Valter Lee

Reputation: 137

  1. Stop MAMP server.
  2. Then go in following folder:

Applications/MAMP/db/mysql56/

In this folder, please remove all direct files except folders. This means that you have to remove only auto.cnf, ibdata, ib_logfile, not any folders.

  1. Restart MAMP server.

It should work.

Thank you.

Upvotes: 12

Valerii Iatsko
Valerii Iatsko

Reputation: 64

In case of MAMP PRO you need to remove ib_logfiles here:

rm -rf /Library/Application\ Support/appsolute/MAMP\ PRO/db/mysql56/ib_logfile*

Upvotes: 1

user3127648
user3127648

Reputation: 1377

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/

Upvotes: 88

zeeawan
zeeawan

Reputation: 6905

MAMP & MAMP PRO 4.0.6 was starting MySql server correctly but stopped doing so after my machine updated the OS to macOS Sierra (10.12.2). I tried a few options mentioned here including setting folder permissions and re-install etc. Nothing seemed fixed the issue for me so I shifted to XAMPP and it is serving OK so far.

Update: I've got MAMP working with this simple solution here.

Upvotes: 2

mikeym
mikeym

Reputation: 6331

I just had this problem. These are the steps that worked for me.

  1. Open Preferences in MAMP, make a note of your current Apache and MySQL Port numbers.

    enter image description here

  2. Click both Set to default Apache and MySQL ports and Reset MAMP buttons then OK.

  3. Quit MAMP

  4. Delete all files (not folders) from /Applications/MAMP/db/mysql directory.

  5. Reboot MAMP and click Start Servers.

    Note: if MySQL starts fine but Apache doesn't, go back to Preferences and set Apache Port back to what it was before. MAMP should refresh after you click OK and both Apache and MySQL should start.

  6. If http://localhost/MAMP/index.php fails to load, open Developer Tools (Chrome), right-click on refresh button and select Empty Cache and Hard Reload. The phpAdmin page should load. If not try going to Application panel in Developer tools, select Clear Storage from the menu and click Clear Site Data.

I hope those steps provide a quick fix for someone without needed to destroy your database tables.

Upvotes: 3

Thremulant
Thremulant

Reputation: 606

I've tried all the solutions above with version 4.2 of MAMP and none of them worked to me in El Capitan OS, so the only thing that worked was uninstalled MAMP with Clean My Mac and then install the older 3.5.2 version, that one worked right away.

Upvotes: 2

Ashish Gupta
Ashish Gupta

Reputation: 29

Remove the files ib_logfileN (N being the number) from the MAMP/db/mysql56 folder.

Then restart MAMP.

Should Work!

Upvotes: 2

Tracey
Tracey

Reputation: 131

I looked at the MAMP site. Go into MAMP/db/mysql56 and rename both the log files (I just changed the number at the end). Voila, restarted MAMP and all was well.

Log File names:

  1. ib_logfile0
  2. ib_logfile1

Upvotes: 13

Dallby
Dallby

Reputation: 596

What worked for me was:

I had a process called "mysqld" running even when MAMP had been quit. I force quit the process, restarted MAMP and it worked again.

Upvotes: 1

JSEvgeny
JSEvgeny

Reputation: 2760

rm /Applications/MAMP/db/mysql56/*

Works fine, but then it shows "No database found" in phpmyadmin although there are databases, so my drupal gave me errors because of this.

All I need to do is simply remove two files ib_logfile0 and ib_logfile1 from /Applications/MAMP/db/mysql56/ and that did the trick for me.

Upvotes: 15

corysimmons
corysimmons

Reputation: 7675

Here's what worked for me:

  • Check to see if you accidentally installed mysql via Brew or something. brew list mysql
  • Uninstall it brew uninstall mysql
  • Try to fire up MAMP. Might need to reinstall.
  • Eventually upgrade to Vagrant and stop fighting with MAMP.

Upvotes: 1

Axel de la Torre
Axel de la Torre

Reputation: 21

Ok, so I tried EVERY suggestion i found here on SO and other forums I nothing worked for me. The only solution, that worked for me was to install MAMP 3 version, since I use MAMP for wordpress projects version 3 works just fine.

Upvotes: 2

Stefan
Stefan

Reputation: 1

You need to leave the mysql database AS IS.

  • Uninstall and reinstall MAMP Pro.
  • For every WP instance that you want to have on your server (localhost), you need to create a NEW database that is not mysql.
  • Go into SequelPro and add database.
  • Use Duplicator to transfer your WP.

Do not use mysql for anything, it appears to be required by MAMP.

Upvotes: -6

Christer
Christer

Reputation: 1681

Im posting this as a potensial Answer!

What i did to solve this was the following:

  1. Restart the computer ( to make sure no mysqld processes are running, even if it crashed and tries to restart itself)
  2. Delete everything that has anything to do with mysql on the computer by running these commands:
    sudo rm /usr/local/mysql
    sudo rm -rf /usr/local/mysql*
    sudo rm -rf /Library/StartupItems/MySQLCOM
    sudo rm -rf /Library/PreferencePanes/MySQL*
    vim /etc/hostconfig and removed the line MYSQLCOM=-YES-
    rm -rf ~/Library/PreferencePanes/MySQL*
    sudo rm -rf /Library/Receipts/mysql*
    sudo rm -rf /Library/Receipts/MySQL*
    sudo rm -rf /var/db/receipts/com.mysql.*
  3. Delete MAMP by running the MAMP PRO uninstaller, then deleting the applications/MAMP folder
  4. Delete the Library/Application Support/appsolute folder (MAMP application support folder)
  5. Reinstall MAMP PRO

Hopefully this helps :)

Upvotes: 3

Related Questions