An automated Batch script designed to recover corrupted XAMPP MySQL services. XADS specifically targets the "Unexpected Shutdown" error while ensuring your critical data remain intact.
As a Data Science student or developer, you may frequently encounter the MySQL Shutdown Unexpectedly error. This issue is common in XAMPP due to:
- Improper Shutdowns: Turning off the PC without stopping XAMPP services.
- Zombie Processes: Multiple instances of
mysqld.exehanging in the background. - Corrupted Logs: Errors in
ib_logfilethat prevent the database engine from initializing. - PID Locks: Leftover
.pidfiles that prevent a fresh start.
XADS.bat automates the surgical recovery process. Below is a comparison of the manual approach versus the automated solution:
| Step | Manual Recovery (High Risk) | XADS.bat (Automated & Safe) |
|---|---|---|
| Process Termination | Finding and killing PIDs manually | Automated taskkill for all XAMPP processes |
| Data Backup | Manual Rename (Prone to overwriting) | Automated backup with unique Timestamps |
| System Restoration | Manual copy-paste from /backup |
Instant structural rebuild of the data directory |
| Data Migration | Moving folders one by one | Smart filtering: Migrates only user DBs & ibdata1 |
- Windows OS (Windows 10 Version 1607+ for full color support)
- XAMPP Installed
- Administrator Privileges (Required for process management)
- Download the
XADS.batfile. - Right-click the file and select Run as Administrator.
- Follow the interactive prompts:
- Specify your XAMPP path (or hit Enter for default).
- Confirm the recovery action.
- Watch the progress bar as your databases are migrated.
- Choose whether to reopen XAMPP Control Panel at the end.
XADS follows a precise recovery sequence:
- Force Purge: Clears all
httpd.exe,mysqld.exe, andxampp-control.exeinstances. - Isolation: Renames the corrupted
datafolder with a unique timestamp. - Registry Rebuild: Generates a clean
datadirectory using verified backup files. - Data Transplant: Migrates database schemas and
ibdata1into the clean environment.
XADS.bat # The main recovery automation script
README.md # Documentation