XAMPP is one of the most popular and used local web development software for web developers. XAMPP is packaged with Apache, PHP, and phpMyAdmin. So, users do need to take any headache for installing all this software separately to start the work.
However, The XAMPP users of Windows machines often get the mysql unexpected shutdown error message in the XAMPP control panel, which is frustrating.
After getting that error message several times, I found the main reason for the issue is to shut down the computer without properly stopping the mysql from the xampp control panel. I usually hibernate my machine to save time and previous workflow. Yet, Windows schedule updates sometimes forcefully restarted the computer, resulting in mysql unexpected shutdown problem.
If you are trying to restore the database from the backup, fixing that issue will take a lot of time. The following tutorial describes the quickest and easiest way to fix that problem within 5-10 minutes.
Let’s get started.
Step 01: Go to xampp/mysql folder. You will get a data folder there.
Step 02: Copy and take a backup of the data folder. Example: I created a backup folder and named that data_3_13_23
Step 03: Navigate to the backup folder. Copy all the files and folders except the “ibdata1” file.
Step 04: Now, navigate to the data folder. Remove “mysql,performance_schema,phpmyadmin,test” folders. Also, remove “aria_log.00000001, my.ini,aria_log_control,ib_buffer_poll,ib_logfile(),iblogfile1,ibtmp1” from the data folder. DO NOT REMOVE THE ibdata1 file from the data folder.
Step 05: Paste copied files from the “backup” folder to the “data” folder.
Step 06: Open the xampp application and try to start MySQL.
Step 07: Now, everything should work normally.