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…

xampp

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.

xampp

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 🙂

7 Give us some moral support.
(Visited 8,361 times, 5 visits today)