MySQL Shutdown Unexpectedly is usually caused by using the same port in another application running on the same device as XAMPP itself.
The error usually appears like this:
Here are the steps that I have successfully tried.
- Rename the c:\xampp\mysql\data folder to c:\xampp\mysql\data_old (or feel free to change to another name).
- Create a new folder c:\xampp\mysql/data.
- Copy all folders or files in mysql\backup to the newly created folder ,mysql\data.
- Copy all database folders that are in mysql\data_old to mysql\data (skip the mysql, performance_schema, and phpmyadmin folders from data_old).
- Finally, copy the ibdata1 file from mysql\data_old and replace it in the mysql\data folder .
- Start MySQL from the XAMPP control panel.
After the last step, XAMPP should be ready to use again.
Good luck. Comment below if there are any problems 🙂