MySQL shutdown unexpectedly.

 Xampp server localhost is not connected. Here is the best solution

Error:
MySQL shut down 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

Solution:

Please follow these steps for the best solution.

  1. First Quit or Close the XAMPP app if it is still open. 
  2. Rename folder C:\xampp\mysql\data to C:\xampp\mysql\data_old
  3. Make a copy of  C:\xampp\mysql\backup folder and rename it C:\xampp\mysql\data
  4. Copy all your folders from C:\xampp\mysql\data_old into C:\xampp\mysql\data folder except mysql, performance_schema, and phpmyadmin folders.
  5. Copy  C:\xampp\mysql\data_old\ibdata1 file into C:\xampp\mysql\data folder
  6. Start MySQL from XAMPP control panel 
Please do not delete the ibdata1 file. Share this post with others. 

Comments