Register Login

How to Fix the 'Error: MySQL Shutdown Unexpectedly' Problem in XAMPP?

Updated Nov 03, 2020

Users working on the MySQL platform encounter an error called “Error: MySQL shutdown unexpectedly”. Issues in the database and corrupted files are some of the reasons behind this error. So, removing these corrupted files will fix this issue.

You might face this error while starting the XAMPP control panel and the Apache module. In this post, we will find a way to resolve this issue.

Cause of “Error: MySQL Shutdown Unexpectedly” in XAMPP

Apart from corrupted files, improper database shut down, missing files and port changes can also cause this error. When you run MySQL in a webserver, the corrupted files in the mysql/data folder cause MySQL to shut down.

This is what the error looks like – 

Error: MySQL shutdown unexpectedly.

This may be due to a blocked port, missing dependencies,

improper privileges, a crash, or a shutdown by another method.

Press the Logs button to view error logs and check

the Windows Event Viewer for more clues

If you need more help, copy and post this

entire log window on the forums

 

Error: MySQL shutdown unexpectedly in XAMPP

Error log

\xampp\mysql\data\mysql_error.log 

InnoDB: Mutexes and rw_locks use Windows interlocked functions

InnoDB: Uses event mutexes

InnoDB: Compressed tables use zlib 1.2.11

InnoDB: Number of pools: 1

InnoDB: Using SSE2 crc32 instructions

InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M

InnoDB: Completed initialization of buffer pool

InnoDB: 128 out of 128 rollback segments are active.

InnoDB: Creating shared tablespace for temporary tables

InnoDB: Setting file '\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...

InnoDB: File '\xampp\mysql\data\ibtmp1' size is now 12 MB.

InnoDB: Waiting for purge to start

InnoDB: 10.4.11 started; log sequence number 47134; transaction id 9

InnoDB: Loading buffer pool(s) from E:\xampp\mysql\data\ib_buffer_pool

Plugin 'FEEDBACK' is disabled.

InnoDB: Buffer pool(s) load completed at 201018 18:42:04

Server socket created on IP: '::'.

Steps to fix this problem – 

  • Stop the XAMPP server, MySQL and Apache
  • Create a backup of the “/xampp/mysql/data” folder using a compression software
  • Rename the “/xampp/mysql/data” folder to “/xampp/mysql/data-old”
  • Create a new folder and name it “/xampp/mysql/data”
  • Copy all folders from the “/xampp/mysql/backup” and paste it to the “/xampp/mysql/data” folder, which you have just created
  • Copy all the databases from the “/xampp/mysql/data-old” folder and paste it to the “/xampp/mysql/data” folder
  • Finally copy the “ibdata1” and all of the log files including “ib_logfile0, ib_logfile1 ” from “/xampp/mysql/data-old” and paste it to the “/xampp/mysql/data” folder
  • Start MySQL from the XAMPP control panel
  • Go to phpMyAdmin to check if all the databases are available and running properly

Solution for Error: MySQL shutdown unexpectedly in XAMPP

While undergoing this process make sure you backup all your data in a secure place.


×