You are currently viewing How to fix “MySQL Shutdown Unexpectedly” error in XAMPP Server
How to fix MySQL shutdown unexpectedly Error in XAMPP Server

How to fix “MySQL Shutdown Unexpectedly” error in XAMPP Server

  • Post author:
  • Post category:Php
  • Post comments:2 Comments

In this tutorial I will show you How to fix MySQL Shutdown Unexpectedly in Xampp Server.

Stop Apache server

Before we start first we need to stop the Apache server. Now Go to C:\Xampp\mysql folder.

Go to c-xampp-mysql folder

Create backup of data folder

Now we need to create a backup of the data folder, so use any Compression folder like winrar or winzip or use windows 11 built in feature “compress to zip file”. Right click on the data folder and click on “Compress to Zip file” . It will create a zip file of the data folder.

Create zip file of the data folder

Rename data folder

Now rename the data folder to data_old.

Rename data folder to data_old folder
data folder renamed as data_folder

Create new data folder

Now we need to create a folder called data.

Create new folder called data
data folder created

Copy data from backup folder

Now copy all the data from the backup folder & paste them inside the data folder.

Copy all data from backup folder
data folder after pasting all data from the backup folder

Copy database folders

Now copy only the database folders from data_old folder & paste all the database folders inside the newly created data folder.

Please note that we pnly need to copy the database folders, do not copy any other folders such as mysql, phpMyAdmin etc.

Select all the database folders and copy them
data folder after copying databases from data_old folder

Copy ibdata files

Now open data_old  folder  & copy these files : ib_buffer_pool, ib_logfile0, ib_logfile1 & ibdata1 & paste these files in the newly created data folder(Choose replace the files in the destination).

Select and copy all files starts with ib
Replace ibdata files in the data folder

Restart Xampp

Now restart Xampp Server & start Apache & Mysql.

Check Databases in phpMyadmin

Now open your browser & open phpMyAdmin by entering this url http://localhost/phpmyadmin/ & check databases.

databases are restored

Databases restored

 You can see that the problem has been fixed and all the databases are restored.

Video Tutorial

This Post Has 2 Comments

  1. hi

    rẩt hay

Leave a Reply