Reputation: 2011
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
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:
Applications/MAMP/tmp/mysql
mysql.sock.lock
Upvotes: 37
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
Reputation: 48
This is what worked for me (Windows 10) :
Tip : You can pin mysql.exe to Start Menu so you don't always have to search for this folder
Upvotes: 1
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
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
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
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
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
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
Reputation: 732
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
Reputation: 459
For me the line innodb_additional_mem_pool_size in my.cnf was causing it
Upvotes: 1
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
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
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
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
Reputation: 137
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.
It should work.
Thank you.
Upvotes: 12
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
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
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
Reputation: 6331
I just had this problem. These are the steps that worked for me.
Open Preferences
in MAMP, make a note of your current Apache and MySQL Port numbers.
Click both Set to default Apache and MySQL ports
and Reset MAMP
buttons then OK.
Quit MAMP
Delete all files (not folders) from /Applications/MAMP/db/mysql
directory.
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.
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
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
Reputation: 29
Remove the files ib_logfileN (N being the number) from the MAMP/db/mysql56 folder.
Then restart MAMP.
Should Work!
Upvotes: 2
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:
Upvotes: 13
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
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
Reputation: 7675
Here's what worked for me:
brew list mysql
brew uninstall mysql
Upvotes: 1
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
Reputation: 1
You need to leave the mysql database AS IS.
Do not use mysql for anything, it appears to be required by MAMP.
Upvotes: -6
Reputation: 1681
Im posting this as a potensial Answer!
What i did to solve this was the following:
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.*
Library/Application Support/appsolute
folder (MAMP application support folder)Hopefully this helps :)
Upvotes: 3