DEV Community

Pradeep Kumar
Pradeep Kumar

Posted on

2

How to FIX: Error: MySQL shutdown unexpectedly

Important: do not delete the ibdata1 file. You could destroy all your databases.

Steps:

  1. Rename folder mysql/data -> mysql/data_old

  2. Make a copy of mysql/backup folder and name it as mysql/data

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

  4. Copy mysql/data_old/ibdata1 file into mysql/data folder

  5. Start MySQL from XAMPP control panel

It should resolve the issue.

Top comments (1)

Collapse
 
manchumahara profile image
Sabuj Kundu

This is correct and safe solution.

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →