How to Solve “MySQL shutdown unexpectedly”

Restore MySQL backup data

Syazwanar
Courage to Write
Feb 17, 2024

--

This can happen due to damage to the database or loss of crucial files in MySQL. The first step that must be taken is to repair the database.

open the mysql folder on xampp

change the name of the ‘data’ folder to ‘data old’

create new ‘data’ folder

Then go to the ‘backup’ folder, copy all the files and paste them into the new ‘data’ folder

Copy ‘ibdata1’ from the ‘old data’ folder, then replace it to the ‘data’ folder

Copy the database and mysql in the ‘old data’ folder, then paste and replace in the ‘data’ folder

MySQL running

After all the steps are done, mysql will run normally.

If it still doesn’t work, use some other method such as using the ‘Shell’ feature, changing the Apache port or changing the MySQL port configuration.

--

--