I'm using XAMPP for local website development. I noticed the 2nd time now that MySQL crashes/corrupts itself a while after doing a (big) database import from an SQL file which was created by exporting the database from the server in PHPMyAdmin. In the meantime things worked fine though.
When I try to start MySQL now the error is:
12:17:23 AM [mysql] Attempting to start MySQL app...
12:17:23 AM [mysql] Status change detected: running
12:17:25 AM [mysql] Status change detected: stopped
12:17:25 AM [mysql] Error: MySQL shutdown unexpectedly.
12:17:25 AM [mysql] This may be due to a blocked port, missing dependencies,
12:17:25 AM [mysql] improper privileges, a crash, or a shutdown by another method.
12:17:25 AM [mysql] Press the Logs button to view error logs and check
12:17:25 AM [mysql] the Windows Event Viewer for more clues
12:17:25 AM [mysql] If you need more help, copy and post this
12:17:25 AM [mysql] entire log window on the forums
Checking the mysql_error.log shows nothing terribly useful:
2022-07-18 0:17:24 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2022-07-18 0:17:24 0 [Note] InnoDB: Uses event mutexes
2022-07-18 0:17:24 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2022-07-18 0:17:24 0 [Note] InnoDB: Number of pools: 1
2022-07-18 0:17:24 0 [Note] InnoDB: Using SSE2 crc32 instructions
2022-07-18 0:17:24 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2022-07-18 0:17:24 0 [Note] InnoDB: Completed initialization of buffer pool
2022-07-18 0:17:24 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2022-07-18 0:17:24 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2022-07-18 0:17:24 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2022-07-18 0:17:24 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2022-07-18 0:17:24 0 [Note] InnoDB: Waiting for purge to start
2022-07-18 0:17:24 0 [Note] InnoDB: 10.4.24 started; log sequence number 56544792; transaction id 997
2022-07-18 0:17:24 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2022-07-18 0:17:24 0 [Note] Plugin 'FEEDBACK' is disabled.
2022-07-18 0:17:24 0 [Note] InnoDB: Buffer pool(s) load completed at 220718 0:17:24
2022-07-18 0:17:24 0 [Note] Server socket created on IP: '::'.
However, checking the Windows Event Viewer under Windows Logs -> Application seems to show the startup failure's culprit:
The description for Event ID 100 from source MariaDB cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
mysqld.exe: Error on close of 'C:\xampp\mysql\data\aria_log_control' (Errcode: 9 "Bad file descriptor")
The system cannot find the file specified
The gist seems to be the error on close of the aria_log_control file. I don't quite understand this error. The file exists and is not locked. Deleting the file does not fix the issue. Also deleting aria_log.00000001 does not work. How does MySQL's startup even fail for this reason and how does MySQL suddenly fail to start (out of nowhere)? I also tried restarting Windows but the issue didn't get fixed. I'm sure there's no malware on my system causing those issues. Moving/Renaming my database's folder inside C:\xampp\mysql\data
did not work, also moving/renaming C:\xampp\mysql\data
directly did not work either. What can I do to avoid this MySQL startup failure and how can I fix it besides a full XAMPP reinstallation? The latter worked to get back up and running with MySQL but it's not a great solution, I'll have to recreate the database, import the schema and the database data itself just for the issue to happen again (most likely).