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 🙂

3 Give us some moral support.
(Visited 3,725 times, 1 visits today)

11 Comments

  1. benshittu January 20, 2018 at 8:05 PM

    Same problem on macOS Seirra.
    Thanks bro.

    Reply
  2. Deniz October 29, 2018 at 1:39 PM

    it says “ERROR! MySQL server PID file could not be found!” when i stop for restart

    Reply
  3. Onaapo March 12, 2019 at 7:55 PM

    Thanks bro, it works like charm!!!

    Reply
  4. Tomek March 19, 2019 at 4:07 PM

    You just saved my life <3 Thank you

    Reply
  5. admin June 2, 2019 at 11:09 PM

    Do you successfully all of steps above?

    Reply
  6. Stan November 13, 2019 at 12:39 PM

    A huge thanks! 🙂

    Reply
  7. ANAND CHAUDHARY December 5, 2019 at 2:23 AM

    I got an error at step 3
    “`./Applications/XAMPP/bin/mysql.server: line 264: kill: (76850) – No such process
    ERROR! “`

    Reply
  8. tob December 8, 2019 at 12:15 AM

    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..!

    Reply
    1. Roland Collin January 20, 2020 at 11:44 PM

      Do you could find a solution for your (and my) problem?
      Thanks
      Roland

      Reply
  9. Sandesh September 15, 2020 at 3:39 PM

    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

    Reply

Leave A Comment

Your email address will not be published.