XAMPP version 7.4.21
+ Apache 2.4.48
+ MariaDB 10.4.20
+ PHP 7.4.21 (VC15 X86 64bit thread safe) + PEAR
I have not changed xampp or apache config except for adding a local certificate and enabling ssl. I have modified php.ini slightly and added xdebug.
I had been experiencing the MySQL unexpected shutdown error on xampp v 7.4.5 and tried to resolve it by backing up my sites and databases and restoring them to xampp 7.4.21. This did not solve the problem. I tried some other methods to fix that I found online including
- executing some database repair commands from the command line
- checking and repairing databases from within phpmyadmin
- renaming mysql\data, copying files from mysql\backup to mysql\data, copying database folders from mysql\data_orig to mysql\data.
These sometimes seem to fix the problem temporarily but the problem does return. Here is what I see when the problem occurs:
1. Reboot machine
2. Start Apache
3. Start MySQL
4. Get the following error:
2:30:31 PM [main] Initializing Control Panel
2:30:31 PM [main] Windows Version: Enterprise 64-bit
2:30:31 PM [main] XAMPP Version: 7.4.21
2:30:31 PM [main] Control Panel Version: 3.3.0 [ Compiled: Apr 6th 2021 ]
2:30:31 PM [main] Running with Administrator rights - good!
2:30:31 PM [main] XAMPP Installation Directory: "c:\xampp7421\"
2:30:31 PM [main] Checking for prerequisites
2:30:31 PM [main] All prerequisites found
2:30:31 PM [main] Initializing Modules
2:30:31 PM [main] Starting Check-Timer
2:30:31 PM [main] Control Panel Ready
2:30:33 PM [Apache] Attempting to start Apache app...
2:30:33 PM [Apache] Status change detected: running
2:30:35 PM [mysql] Attempting to start MySQL app...
2:30:35 PM [mysql] Status change detected: running
2:30:42 PM [mysql] Status change detected: stopped
2:30:42 PM [mysql] Error: MySQL shutdown unexpectedly.
2:30:42 PM [mysql] This may be due to a blocked port, missing dependencies,
2:30:42 PM [mysql] improper privileges, a crash, or a shutdown by another method.
2:30:42 PM [mysql] Press the Logs button to view error logs and check
2:30:42 PM [mysql] the Windows Event Viewer for more clues
2:30:42 PM [mysql] If you need more help, copy and post this
2:30:42 PM [mysql] entire log window on the forums
See the following in mysql_error.log:
2021-09-04 14:30:36 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2021-09-04 14:30:36 0 [Note] InnoDB: Uses event mutexes
2021-09-04 14:30:36 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-09-04 14:30:36 0 [Note] InnoDB: Number of pools: 1
2021-09-04 14:30:36 0 [Note] InnoDB: Using SSE2 crc32 instructions
2021-09-04 14:30:36 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2021-09-04 14:30:36 0 [Note] InnoDB: Completed initialization of buffer pool
2021-09-04 14:30:36 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=326416538
2021-09-04 14:30:41 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2021-09-04 14:30:41 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2021-09-04 14:30:41 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2021-09-04 14:30:41 0 [Note] InnoDB: Setting file 'C:\xampp7421\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2021-09-04 14:30:41 0 [Note] InnoDB: File 'C:\xampp7421\mysql\data\ibtmp1' size is now 12 MB.
2021-09-04 14:30:41 0 [Note] InnoDB: Waiting for purge to start
2021-09-04 14:30:41 0 [Note] InnoDB: 10.4.20 started; log sequence number 326416547; transaction id 81018
2021-09-04 14:30:41 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp7421\mysql\data\ib_buffer_pool
2021-09-04 14:30:41 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-09-04 14:30:41 0 [Note] InnoDB: Buffer pool(s) load completed at 210904 14:30:41
2021-09-04 14:30:41 0 [Note] Server socket created on IP: '::'.
From the Windows Event Viewer:
Faulting application name: mysqld.exe, version: 10.4.20.0, time stamp: 0x60c0c152
Faulting module name: mysqld.exe, version: 10.4.20.0, time stamp: 0x60c0c152
Exception code: 0x80000003
Fault offset: 0x000000000066b992
Faulting process ID: 0x4e7c
Faulting application start time: 0x01d7a1d4193aac44
Faulting application path: c:\xampp7421\mysql\bin\mysqld.exe
Faulting module path: c:\xampp7421\mysql\bin\mysqld.exe
Report ID: 4faa1a8b-8faf-4f71-860b-c2d592021498
Faulting package full name:
Faulting package-relative application ID:
The most reliable method I have found to fix the problem for the longest period of time is this:
1. Stop MySQL
2. Rename mysql\aria_log_control to mysql\aria_log_controlHIDEME
3. Start MySQL
With these steps, MySQL reliably keeps running until the next time the computer reboots. It does not matter whether I just reboot, or whether I shut down MySQL and Apache first.
My question is what can I do to properly troubleshoot this issue so that it stops occurring?
Cheers
Paul