XAMPP - MySQL shutdown unexpectedly
STOP! Please do NOT delete
ibdata1
file!
Deleting this file is like playing a Russian roulette with your databases, it could work and restablish everything, but also, probably could leave unusable every database you have.
Instead, first try using the MySQL backup folder which is included with XAMPP. So do the next:
- Rename the folder
mysql/data
tomysql/data_old
(you can use any name) - Create a new folder
mysql/data
- Copy the content that resides in
mysql/backup
to the newmysql/data
folder - Copy all your database folders that are in
mysql/data_old
tomysql/data
(skipping themysql
,performance_schema
, andphpmyadmin
folders fromdata_old
) - Finally copy the
ibdata1
file frommysql/data_old
and replace it insidemysql/data
folder - Start MySQL from XAMPP control panel
And, voilà!
IMPORTANT Deleting this file may render any existing MySQL data unusable. Use with caution
Hey I just did this and it worked:
- exit Xampp server
- go to your
C:\xampp\mysql\data
directory - delete the
ibdata1
file - restart xampp server
It should work
- Go to mysql/data/
- Delete all random files (except the actual database folders)
- Restart Apache and MySQL.
It should fix it.