🧭 Step-by-Step Fix (XAMPP Safe Method)
⚠️ First, Backup Everything
Before any recovery attempt:
Stop MySQL in XAMPP.
Go to:
C:\xampp\mysql\data
Copy the entire data folder to somewhere safe, e.g.:
C:\backup_mysql_data_2025_10_10
🧰 Step 1: Delete Corrupted Aria Logs
In C:\xampp\mysql\data, delete all files starting with:
aria_log.
Also delete:
aria_log_control
🧰 Step 2: Remove InnoDB Log Files
Still inside C:\xampp\mysql\data, delete:
ib_logfile0
ib_logfile1
(These will be recreated automatically on restart.)
🧰 Step 3: Force Recovery Mode (to extract data safely)
If it still won’t start, edit:
C:\xampp\mysql\bin\my.ini
Under [mysqld], add:
innodb_force_recovery = 1
Then try starting MySQL from XAMPP again.
If it still fails, increase the value gradually up to 6:
innodb_force_recovery = 6
⚠️ Warning:
You can only dump/export data in recovery mode.
Do not write or modify data.
Once MySQL starts:
Use phpMyAdmin or mysqldump to export all your databases.
Stop MySQL again.
Remove the innodb_force_recovery line from my.ini.
🧰 Step 4: Rebuild the Data Directory (if nothing works)
If MySQL still won’t start:
Stop XAMPP.
Rename:
C:\xampp\mysql\data → C:\xampp\mysql\data_old
Create a new empty folder:
C:\xampp\mysql\data
Copy the backup from:
C:\xampp\mysql\backup
(This contains default system tables: mysql, performance_schema, etc.)
Start MySQL.
Reimport your .sql database exports.
Top comments (0)