How To Fix XAMPP MySQL Shutdown Unexpectedly.

Xampp – It is an open-source web service invented by Apache. It works as a local host or server that helps in the testing of client websites before they can publish on the web server remotely. It helps to work on the different projects under MySQL, PHP, etc. on it. Basically, the main purpose of the use is to test the working of the web application that works as a testing tool.

It works best in the Local world environment. Sometimes an error message is displayed in the Xampp server as they are not able to start the MySQL service on it.

Error message     “MySQL shutdown unexpectedly”

When you start the Xampp server the error may arise. Firstly you view Apache and MySQL.When you click on the apache it will successfully start but in MySQL, the error might display that MySQL shutdown unexpectedly 

Solution for MySQL shutdown unexpectedly error in xampp

To resolve the error there are some steps you need to follow

  • Close your Xampp control panel
  • Go to the C drive folder / open the Xampp folder / click on the MySQL folder in it
  • Click on the data file option and right-click on it
  • Rename it and save it with the name “ data old”
  • In the same place create a new folder with the name of Data in it which is empty at the current time
  • Open the Backup folder/copy all the content in the form of files and folder 
  • Paste all the copied content into the data folder
  • Move to the data old folder
  • Copy the folder by skipping some folders like MySQL, performance schema, phpmyadmin folders in the data old option
  • Paste all the folders and files in the Data folder
  • Open the data old folder and copy the ibdata1 folder into it
  • Paste the copy folder into the Data folder
  • Replace it if you already have the file
  • Now if you want to restart your system you can otherwise start the Xampp server again from the Xampp control panel
  • Open the Xampp panel
  • Start the Apache that is working accurate and successfully with messages displayed in the dialog box
  • Start the MySQL, now you can view a green blinking line on it that indicate no error message in it
  • Open the Local host like phpmyadmin to view that the database may exist in the same manner. 
  • After viewing the database the error may remove and the user can work in the database without any interruption 

These are the simple and easy steps that you need to follow to remove the error that occurs when you start MySQL in the Xampp server. It is a common error situation that might occur most of the time. 

You only need to add on the new folder of data while replacing the old data folder.

The main reason behind this error at the time another port uses this 3306 port service. You only need to change the port to resolve the error problem.

Leave a Comment