Error: MySQL shutdown unexpectedly.

When I open XAMPP and click start MySQL button and it gives me an error. I had started it just before, but now it isn’t working.


Stop there! Please do not delete anything!

Some of the answers in Stackoverflow or in other platform could leave completely unusable your database!, so, before deleting files, first try to do what the error message in XAMPP message panel recommend you to do, using the MySQL backup folder which is included with XAMPP. So do the next:

Step 1. Rename the folder c:\xampp\mysql\data to c:\xampp\mysql\data_old (you can use any name).

Step 2. Create a new folder c:\xampp\mysql/data.

Step 3. Copy the content that resides in mysql\backup to the new mysql\data folder.

Step 4. Copy all your database folders that are in mysql\data_old to mysql\data (skipping the mysql, performance_schema, and phpmyadmin folders from data_old).

Step 5. Finally copy the ibdata1 file from mysql\data_old and replace it inside mysql\data folder.

Step 6. Start MySQL from XAMPP control panel.

And, Its DONE . No databases lost, no ports changed, no run as administrator, no force recovery, no kill mysqld process, no restoring from previous versions, no more errors.

Thanks for Reading.

keep Coding.

Follow Me on
Latest posts by Sushant Kumar (see all)
Total Page Visits: 65 - Today Page Visits: 4