In some cases or updates XAMPP start doing unexpected things. Shutdown unexpectedly is one of them and it makes us really curious. Because the data we have in our database is important and we cannot risk that at all.
In case you are getting following from the XAMPP control panel then you need to restore your database from backup.
[mysql] Attempting to start MySQL app...
[mysql] Status change detected: running
[mysql] Status change detected: stopped
[mysql] Error: MySQL shutdown unexpectedly.
[mysql] This may be due to a blocked port, missing dependencies,
[mysql] improper privileges, a crash, or a shutdown by another method.
[mysql] Press the Logs button to view error logs and check
[mysql] the Windows Event Viewer for more clues
[mysql] If you need more help, copy and post this
[mysql] entire log window on the forums
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/data
to xamppmysql/data_bk
- Create a new folder
xampp/mysql/data
- Copy the content that resides in xampp/
mysql/backup
to the newmysql/data
folder - Copy all your database folders that are in xampp
mysql/data_bk
to xampp/mysql/data
Important: Do not copy the mysql, performance_schema, and phpmyadmin folders from xampp/mysql/data_bk - Finally copy the
ibdata1
file fromxampp/mysql/data_bk
and replace it insidexampp/mysql/data
folder - Start MySQL from XAMPP control panel
I hope this time it worked for you! please leave your feedback below to help others.
7 Comment(s)
i have tried this but Not working………..
Thank you, this worked. The only thing was that I needed to go back and put in user information. So now I have backed up the files again if needed.
You sir, have saved my life, my local testing databases and a lot of time in my work. Thanks a lot.
I am glad it helped you 🙂
It worked. Thanks so much
Worked for me, thanks!
Thanks so much – saved me a lot of grief!