We use xampp as the server management tool during local development. It provides us environment to run PHP, MySQL, Apache server, Filezilla, Mercury or Tomcat.
If we use a local development environment, we sometimes run into problems that are similar to those on a live server.
In some cases, our website or web application may be unable to connect with its database because MySQL isn’t running or it shut down unexpectedly.
Depending on which local environment we use, the process of troubleshooting your MySQL database might vary a bit.
With XAMPP, the process is remarkably straightforward since we get access to a control panel instead of having to rely on the command line only.
What is this “MySQL Shutdown Unexpectedly” Xampp error:
MySQL Shutdown Unexpectedly errors may come for different reasons. One of the reasons for this error is due to the. misconfiguration of MySQL and its directory configuration of mishandling of files.

To solve the above problem, we can do a simple tweak to the files and folder and update the files. Doing this may help to resolve the MySQL Shutdown Unexpectedly error easily.
[Solved] XAMPP MySQL Shutdown Unexpectedly Fixed Successfully:
Note: Warning! Don’t delete the `ibdata1` file.
Follow the following steps carefully to solve the MySQL shutdown unexpectedly problem.
- Rename folder mysql/data to mysql/data_old
- Make a copy of mysql/backup folder and name it as mysql/data
- Copy all your database folders and mysql folder from mysql/data_old into mysql/data
- Copy mysql/data_old/ibdata1 file into mysql/data folder

Finally, Start MySQL from XAMPP Control Panel and check if the MYSQL is running or not. If still the problem exists, try to install in freshly after completely removing the files.