Xampp : “Error: MySQL shutdown unexpectedly”?

When opening XAMPP unexpectedly MYSQL service got down. Restarting will also not able to solve it.
12:19:12 PM [mysql] Attempting to start MySQL app…
12:19:12 PM [mysql] Status change detected: running
12:19:13 PM [mysql] Status change detected: stopped
12:19:13 PM [mysql] Error: MySQL shutdown unexpectedly.
12:19:13 PM [mysql] This may be due to a blocked port, missing dependencies,
12:19:13 PM [mysql] improper privileges, a crash, or a shutdown by another method
12:19:13 PM [mysql] Press the Logs button to view error logs and check
12:19:13 PM [mysql] the Windows Event Viewer for more clues
12:19:13 PM [mysql] If you need more help, copy and post this
12:19:13 PM [mysql] entire log window on the forums
:: SOLUTION ::
Here is the best solution so far we found.
Shut down xampp service first. And do these steps.
Important thing : do NOT delete ibdata1 file. You could destroy all your databases.
Step 1 : Go to your xampp folder > mysql > take a copy of backup folder.
Step 2 : Rename folder mysql/data to mysql/data_old
Step 3 : Rename that STEP 1 backup folder to data
Step 4 : Copy all your database folders from mysql/data_old into mysql/data (except mysql, performance_schema, and phpmyadmin folders)
Step 5 : Copy mysql/data_old/ibdata1 file into mysql/data folder
Now you can start Xampp control panel.
1 thought on “Xampp : “Error: MySQL shutdown unexpectedly”?”