MySQL Database Doesn’t Start in XAMPP on Mac OS X
Are you struck in the same problem ? A last couple of weeks we have found some problem in XAMPP on our Mac OS X. So that why we are here and provide our solution to everyone.
Our problem is…

In the picture above. We try to click “Start” button on the right hand side to start MySQL Database in XAMPP on Mac OS X. The progressing are show status for “Starting…” for 3-5 mins, and we think that these are abnormal situation because of the starting process will take time for 1-2 mins as normally.

So, we attempt to wait until the progressing status are finish, and we found that it backward to the status of “Stopped”. We click “Start” button again and again but the result still the same.
Actually, we still can’t find the exactly solution for the problem of MySQL Database doesn’t start in XAMPP on Mac OS X. But today we serve many sites and found the great one that is workaround solution for this case. It easy and no more steps to finish. So, let’s start.
Step 1: Go to your Finder and edit the file as the following path below.
/Applications/XAMPP/xamppfiles/etc/my.cnf
Step 2: Open the file and find the [mysqld] section
add one line as following
innodb_force_recovery = 1
,and save.
Step 3: Run command in your Terminal
sudo /Applications/XAMPP/bin/mysql.server start
Wait until everything is OK.
Step 4: Edit the my.cnf again and remove the line you just added
innodb_force_recovery = 1
,and save.
Step 5: Stop for restart
sudo /Applications/XAMPP/bin/mysql.server stop
Wait until everything is OK.
Remind that if you didn’t passed this step your all tables will be read only.
Step 6: Open XAMPP Manager and click “Start” button to start MySQL Database again
The progressing status will show “Running”.
NOTE: This problem will be faced again, after you restart your Mac OS X. So, you have to repeat these steps again. Remember that this is the workaround solution.
If you have any better let me know in comment.
Thanks 🙂
5 Give us some moral support.
Same problem on macOS Seirra.
Thanks bro.
it says “ERROR! MySQL server PID file could not be found!” when i stop for restart
Thanks bro, it works like charm!!!
You just saved my life <3 Thank you
Do you successfully all of steps above?
your solution did not work but the link’s below did (it was pretty easy to do)
https://medium.com/@panayiotisgeorgiou/mysql-database-wont-start-in-xampp-manager-osx-ef559b00dfef
A huge thanks! 🙂
I got an error at step 3
“`./Applications/XAMPP/bin/mysql.server: line 264: kill: (76850) – No such process
ERROR! “`
sudo /Applications/XAMPP/bin/mysql.server start
Starting MariaDB
.2019-12-07 18:13:59 65299 mysqld_safe Logging to ‘/Applications/XAMPP/xamppfiles/var/mysql/Tobiass-MBP.fritz.box.err’.
2019-12-07 18:13:59 65299 mysqld_safe Starting mysqld daemon with databases from /Applications/XAMPP/xamppfiles/var/mysql
./Applications/XAMPP/bin/mysql.server: line 264: kill: (65299) – No such process
ERROR!
Please help..!
Do you could find a solution for your (and my) problem?
Thanks
Roland
I only typed the below command in terminal and restarted the xampp, and it worked for me
sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start
ini tidak berhasil bagi saya. lalu saya mencoba cara lain
1. sudo Lsof -PiTCP -sTCP:LISTEN
2. cari mysql jika ada matikan secara paksa
3. sudo pkill -f mysql
4. jalankan ulang dengan xampp atau sudo /applications/xampp/xamppfiles/bin/mysql.server start
it’s work
thankyoy
this didn’t work for me. then i tried another way
1. sudo Lsof -PiTCP -sTCP:LISTEN
2. search for mysql if there is forcibly turn it off
3. sudo pkill -f mysql
4. restart with xampp or sudo /applications/xampp/xamppfiles/bin/mysql.server start
it’s work
Thank You
Thanks @surya
This works for me as well