How to fix MySQL shutdown unexpectedly
Note: If you don’t do following very carefully there are chances you can lose your databases. So be very careful to follow point 1.
- Rename the folder xampp/
mysql/datato xamppmysql/data_bk - Create a new folder
xampp/mysql/data - Copy the content that resides in xampp/
mysql/backupto the newmysql/datafolder - Copy all your database folders that are in xampp
mysql/data_bkto xampp/mysql/data
Important: Do not copy the mysql, performance_schema, and phpmyadmin folders from xampp/mysql/data_bk - Finally copy the
ibdata1file fromxampp/mysql/data_bkand replace it insidexampp/mysql/datafolder - Start MySQL from XAMPP control panel