XAMPP – How to solve “Error: MySQL shutdown unexpectedly”?

2024, this worked me :

Step 1. Rename the folder C:\xampp\mysql\data to C:\xampp\mysql\data_bkp (you can use any name).

Step 2. Create a new folder, C:\xampp\mysql\data.

Step 3. Copy the content that resides in mysql\backup to the new mysql\data folder.

Step 4. Copy all your database folders that are in mysql\data_bkp to mysql\data (skipping the mysql, performance_schema, and phpmyadmin folders from mysql\data_bkp).

Important note: Please do not replace the existing files while pasting (click skip for these files)

Step 5. Finally copy the ibdata1 file from mysql\data_bkp and replace it inside the mysql\data folder.

Step 6. Start MySQL from XAMPP control panel.

https://stackoverflow.com/questions/18022809/how-can-i-solve-error-mysql-shutdown-unexpectedly

#################################
Method 1 (22 Dec 2021)
Stop MySQL.
Go to the C:/xampp/mysql directory and copy the data folder and keep it somewhere else (probably in another drive) as a backup.
Go to your original data folder (C:/xampp/mysql) and sort the files by ‘Type.’
Select the files that have the type INFO File and delete them (screenshot below).
Start MySQL. It should work now.

https://stackoverflow.com/questions/18022809/how-to-solve-error-mysql-shutdown-unexpectedly

Blogbook : PHP | Javascript | Laravel | Corcel | CodeIgniter | VueJs | ReactJs | WordPress