If your MySQL on XAMPP fails to start due to the following error, you can try these steps.
XAMPP Error

mysql_error.log
2025-01-27 10:15:49 0 [Note] Starting MariaDB 10.4.32-MariaDB source revision c4143f909528e3fab0677a28631d10389354c491 as process 14752
2025-01-27 10:15:49 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2025-01-27 10:15:49 0 [Note] InnoDB: Uses event mutexes
2025-01-27 10:15:49 0 [Note] InnoDB: Compressed tables use zlib 1.3
2025-01-27 10:15:49 0 [Note] InnoDB: Number of pools: 1
2025-01-27 10:15:49 0 [Note] InnoDB: Using SSE2 crc32 instructions
2025-01-27 10:15:49 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2025-01-27 10:15:49 0 [Note] InnoDB: Completed initialization of buffer pool
2025-01-27 10:15:49 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2025-01-27 10:15:49 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2025-01-27 10:15:49 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2025-01-27 10:15:49 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2025-01-27 10:15:49 0 [Note] InnoDB: Waiting for purge to start
2025-01-27 10:15:49 0 [Note] InnoDB: 10.4.32 started; log sequence number 47065; transaction id 8
2025-01-27 10:15:49 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2025-01-27 10:15:49 0 [Note] Plugin 'FEEDBACK' is disabled.
2025-01-27 10:15:49 0 [Note] InnoDB: Buffer pool(s) load completed at 250127 10:15:49
2025-01-27 10:15:49 0 [Note] Server socket created on IP: '::'.
Solution
Possible Causes and Fixes
- Port Conflict: Another program might be using the default MySQL port (3306). You can check this using the Netstat button in the XAMPP Control Panel. If port 3306 is occupied, consider changing the port used by MySQL or terminating the process using it.
- Corrupted Data: MySQL’s data might be corrupted. Restoring from a backup could resolve the issue.
Solution 1: Restore MySQL Backup
- Stop any running services and close XAMPP.
- Navigate to the MySQL backup directory (
C:\xampp\mysql\backup). - Copy all files except
ibdata1. - Paste these files into the MySQL data directory (
C:\xampp\mysql\data). - Restart XAMPP and start the MySQL service.
Solution 2: Change MySQL Port
- Open the XAMPP Control Panel and click Config for the MySQL module.
- Select
my.iniand change the port number from 3306 to another unused port (e.g., 3307). - Save changes and restart the MySQL service.
- Update your application to use the new port number.
my.ini
[mysqld]
port=3307
Solution 3: Check for Other MySQL Instances
- Open Task Manager (Ctrl + Alt + Delete) and check for other MySQL processes.
- Terminate any MySQL processes you find and try restarting MySQL in XAMPP.
If none of these solutions work, consider reinstalling XAMPP.