How to resolve MySQL shutdown unexpectedly.

By, Kiran Nanaware
11th August 2022

If you’re facing the below image error don’t worry, see the below solution for this.

All people are thinking this error is very hard to resolve. Whenever people face this error, they directly uninstall xampp and install it again thinking that this might solve their error. But instead, they lose their databases.

So, let’s look into a solution where there will be no loss of the database, no changing of ports, no require to run as an administrator, no force recovery, no need to use the kill mysqld command, and no need to restore from previous versions and alas no more errors.

If you follow these steps, you will have your database again.Follow the below steps to resolve this error:

Step 1: Go to path “c:\xampp\mysql\data” and rename the data folder.

It must look like “c:\xampp\mysql\data_mybackup”.

Step 2: After renaming that folder, again create a folder named data on this path:


Step 3: Then go to “c:\xampp\mysql\backup” and copy all the content and paste it in this path: “c:\xampp\mysql\data”.

Step 4: Copy all your database folders that are in “c:\xampp\mysql\data_mybackup” to “c:\xampp\mysql\data” (Skip the following folders while copying from “c:\xampp\mysql\data_mybakup: mysql, performance_schema, and phpmyadmin ).

IMPORTANT NOTE:  Please do not replace the existing files while pasting (click skip these files)

Step 5: Copy the file ‘ibdata1’ from “c:\xampp\mysql\data_mybackup” and replace it in the “c:\xampp\mysql\data” folder.

Step 6: Now open your xampp control panel with Run as administrator.

Step 7: Start MySQL.

Finally, it’s done!!!

Coditron Technologies


Corporate Office : Greens Center, Thergaon Pune 411033

Operation Office: USA: PO Box # 582973 ElkGrove CA 95758