XAMPP MySQL Shutdown Unexpectedly

When I open XAMPP and click start MySQL button and it gives me an error. I had started it just before, but now it isn’t working.

The rest of the log:

could not open single-table tablespace file .\xat\payments.ibd
We do not continue the crash recovery, because the table may become
InnoDB: corrupt if we cannot apply the log records in the InnoDB log to it.
To fix the problem and start mysqld:
If there is a permission problem in the file and mysqld cannot
open the file, you should modify the permissions. If the table is not needed, or you can restore it from a backup,
then you can remove the .ibd file, and InnoDB will do a normal
crash recovery and ignore that table.
If the file system or the disk is broken, and you cannot remove
InnoDB: the .ibd file, you can set innodb_force_recovery > 0 in my.cnf
InnoDB: and force InnoDB to continue crash recovery here.

What is the cause of these errors and how can I rectify them?

This Post Has One Comment

  1. No Fault

    Deleting this file is like playing a Russian roulette with your databases, it could work and reestablish 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 to mysql/data_old (you can use any name)
    Create a new folder mysql/data
    Copy the content that resides in mysql/backup to the new mysql/data folder
    Copy all your database folders that are in mysql/data_old to mysql/data (skipping the mysql, performance_schema, and phpmyadmin folders from data_old)
    Finally copy the ibdata1 file from mysql/data_old and replace it inside mysql/data folder
    Start MySQL from XAMPP control panel

Leave a Reply