mysql shutdown unexpectedly error

How to Fix Error MySQL Shutdown Unexpectedly

While using MySQL, sometimes you may get an error saying MySQL Shutdown Unexpectedly. In this article, we will learn how to fix this error.

How to Fix Error MySQL Shutdown Unexpectedly

This issue is commonly faced while using XAMPP. First of all, make sure you have not deleted ibdata1 file else it will end up deleting all your databases and you will see this error.

Next, rename folder mysql/data to mysql/data_old.

Then take a backup of mysql/backup and rename it to mysql/data.

Copy all your database folders from mysql/data_old into mysql/data (except mysql, performance_schema, and phpmyadmin folders).

Also copy mysql/data_old/ibdata1 file into mysql/data folder. Start MySQL from control panel.

If the above method does not work for you, then create a backup of ibdata1 file at C:\xampp\mysql\data (e.g. as ibdata1.bak) and then delete ibdata1 folder and restart XAMPP server. Please use this method only after you have taken backup of ibdata1 file.

In this article, we have learnt how to fix error MySQL shutdown unexpectedly that occurs in XAMPP.

Also read:

How to Fix 2006 MySQL Server Has Gone Away Error
How to Get Previous URL in JavaScript
How to Get Timezone & Offset in JavaScript
How to Check if JS Object Has Property
How to Auto Increment With Prefix As Primary Key in MySQL

Leave a Reply

Your email address will not be published. Required fields are marked *