Table of contents
In this post, if your XAMPP has an error on MySQL shutdown unexpectedly then this is for you. I also experience this issue so I want to share the solution with you in case you experience it.
Â
Sample errors:
Error: MySQL shutdown unexpectedly.
Due to a blocked port
Missing dependencies
Improper privileges
Shutdown by another method
Before doing this we recommend not to delete your files instead do a backup for it in case of unusual results.
Â
Here are the steps below:
1. Rename the folder mysql/data to mysql/data_old (you can use any name)
2. Create a new folder mysql/data
3. Copy the content inside mysql/backup to the new mysql/data folder
4. Copy all your database folders that are in mysql/data_old to mysql/data (skipping the mysql, performance_schema, and phpmyadmin folders from data_old)
5. Finally copy the ibdata1 file from mysql/data_old and replace it inside mysql/data folder
6. Start MySQL from XAMPP control panel
Â
BOOM. It works!
Â
Â
I hope it helps. Credit with this post at StackOverflow best answer.