The XAMPP users of Windows machines often get the mysql unexpected shutdown error message in the XAMPP control panel. It is frustrating. After getting that error message several times, I found the main reason for the issue is shutdown the computer without properly stop the mysql from the xampp control panel. I usually hibernate my machine to save time and previous workflow. However, sometimes, windows schedule updates forcefully restarted the computer and it results in mysql unexpected shutdown problem.
Now, If you are trying to restore the database from the backup, it will take a lot of time to fix that issue. 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 folder except “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.