How to fix Error: MySQL shutdown unexpectedly

PHP

This is a very common issue for developers. You can fix this issue without uninstalling the XAMPP.

Don’t delete ibdata1 file. Otherwise your database will be destroyed.

First Take the back of MySQL backup folder (xampp/mysql/backup).Rename the MySQL data folder to data_old (xampp/mysql/data to xampp/mysql/data_old).Now create a new MySQL data(xampp/mysql/data) folder.After that copy all data from backup folder (xampp/mysql/backup) and paste in the data(xampp/mysql/data) folder.Now copy all the database folder from xampp/mysql/data_old and paste in the xampp/mysql/data folder .(except mysql, performance_schema, and phpmyadmin folders).Copy xampp/mysql/data_old/ibdata1 paste into xampp/mysql/data folder.After this restart the MySQL from the XAMPP Control panel.

The post How to fix Error: MySQL shutdown unexpectedly appeared first on PHPGurukul.