mySQL file error

Problems with the Windows version of XAMPP, questions, comments, and anything related.

mySQL file error

Postby Ag2000 » 26. November 2023 03:01

I think there is a buggered file stopping mySQL from starting. This looks it is similar to
https://community.apachefriends.org/f/viewtopic.php?f=16&t=83491

data from the control panel:
5:28:46 PM [main] Initializing Control Panel
5:28:46 PM [main] Windows Version: Home 64-bit
5:28:46 PM [main] XAMPP Version: 8.2.4
5:28:46 PM [main] Control Panel Version: 3.3.0 [ Compiled: Apr 6th 2021 ]
5:28:46 PM [main] Running with Administrator rights - good!
5:28:46 PM [main] XAMPP Installation Directory: "c:\xampp\"
5:28:46 PM [main] Checking for prerequisites
5:28:47 PM [main] All prerequisites found
5:28:47 PM [main] Initializing Modules
5:28:47 PM [main] The FileZilla module is disabled
5:28:47 PM [main] The Mercury module is disabled
5:28:47 PM [main] The Tomcat module is disabled
5:28:47 PM [main] Starting Check-Timer
5:28:47 PM [main] Control Panel Ready
5:29:12 PM [Apache] Attempting to start Apache app...
5:29:12 PM [Apache] Status change detected: running
5:29:22 PM [mysql] Attempting to start MySQL app...
5:29:22 PM [mysql] Status change detected: running
5:29:22 PM [mysql] Status change detected: stopped
5:29:22 PM [mysql] Error: MySQL shutdown unexpectedly.
5:29:22 PM [mysql] This may be due to a blocked port, missing dependencies,
5:29:22 PM [mysql] improper privileges, a crash, or a shutdown by another method.
5:29:22 PM [mysql] Press the Logs button to view error logs and check
5:29:22 PM [mysql] the Windows Event Viewer for more clues
5:29:22 PM [mysql] If you need more help, copy and post this
5:29:22 PM [mysql] entire log window on the forums


That gives me no real information. Relevant entries in the mysql_error.log
2023-11-25 17:26:17 0 [Note] Server socket created on IP: '::'.
2023-11-25 17:29:22 0 [Note] Starting MariaDB 10.4.28-MariaDB source revision c8f2e9a5c0ac5905f28b050b7df5a9ffd914b7e7 as process 12112
2023-11-25 17:29:22 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2023-11-25 17:29:22 0 [Note] InnoDB: Uses event mutexes
2023-11-25 17:29:22 0 [Note] InnoDB: Compressed tables use zlib 1.2.12
2023-11-25 17:29:22 0 [Note] InnoDB: Number of pools: 1
2023-11-25 17:29:22 0 [Note] InnoDB: Using SSE2 crc32 instructions
2023-11-25 17:29:22 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2023-11-25 17:29:22 0 [Note] InnoDB: Completed initialization of buffer pool
2023-11-25 17:29:22 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2023-11-25 17:29:22 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2023-11-25 17:29:22 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2023-11-25 17:29:22 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2023-11-25 17:29:22 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2023-11-25 17:29:22 0 [Note] InnoDB: Waiting for purge to start
2023-11-25 17:29:22 0 [Note] InnoDB: 10.4.28 started; log sequence number 9784973; transaction id 61908
2023-11-25 17:29:22 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2023-11-25 17:29:22 0 [Note] Plugin 'FEEDBACK' is disabled.
2023-11-25 17:29:22 0 [Note] Server socket created on IP: '::'.


From the Windows Event log I think I see the problem. Several error entries:
Server socket created on IP: '::'.
Fatal error: Can't open and lock privilege tables: Incorrect file format 'db'
Aborting
mysqld.exe: Error writing file 'C:\xampp\mysql\data\aria_log_control' (Errcode: 9 "Bad file descriptor")
mysqld.exe: Aria engine: checkpoint failed
mysqld.exe: Error writing file 'C:\xampp\mysql\data\aria_log_control' (Errcode: 9 "Bad file descriptor")
mysqld.exe: Error on close of 'C:\xampp\mysql\data\aria_log_control' (Errcode: 9 "Bad file descriptor")


The file aria_log_control is there. Administrators is the owner and has 'full control' The name of aria_log.00000001 looks odd but what do I know.

Everything has been working fine for the passed several days. trying to continue working today and...
Thanks for any pointers on where/how to clear the error (without losing the data bases - which of course is not backed up lately :( ).
Say what you will about Sisyphus. He always has work.
Ag2000
 
Posts: 14
Joined: 26. November 2023 02:09
XAMPP version: 8.2.12
Operating System: windows 11

Re: mySQL file error

Postby Ag2000 » 28. November 2023 00:17

With all efforts to salvage the situation a failure, I took this as an opportunity to update xampp.
Reminded me how much I dislike the xampp update process. The need to move (save) the hole htdocs folder and save/backup everything in mysql/data to completely empty the directory. BUT the price is right! So thinks for all the hard work.
Say what you will about Sisyphus. He always has work.
Ag2000
 
Posts: 14
Joined: 26. November 2023 02:09
XAMPP version: 8.2.12
Operating System: windows 11

Re: mySQL file error

Postby Ag2000 » 28. November 2023 20:36

This does not seem to be a one-time error. Again worked fine yesterday Today I get:
12:08:20 PM [main] Initializing Control Panel
12:08:20 PM [main] Windows Version: Home 64-bit
12:08:20 PM [main] XAMPP Version: 8.2.12
12:08:20 PM [main] Control Panel Version: 3.3.0 [ Compiled: Apr 6th 2021 ]
12:08:20 PM [main] Running with Administrator rights - good!
12:08:20 PM [main] XAMPP Installation Directory: "c:\xampp\"
12:08:20 PM [main] Checking for prerequisites
12:08:23 PM [main] All prerequisites found
12:08:23 PM [main] Initializing Modules
12:08:23 PM [main] The FileZilla module is disabled
12:08:23 PM [main] The Mercury module is disabled
12:08:23 PM [main] The Tomcat module is disabled
12:08:23 PM [main] Starting Check-Timer
12:08:23 PM [main] Control Panel Ready
12:08:29 PM [Apache] Attempting to start Apache app...
12:08:29 PM [Apache] Status change detected: running
12:08:37 PM [mysql] Attempting to start MySQL app...
12:08:37 PM [mysql] Status change detected: running
12:08:38 PM [mysql] Status change detected: stopped
12:08:38 PM [mysql] Error: MySQL shutdown unexpectedly.
12:08:38 PM [mysql] This may be due to a blocked port, missing dependencies,
12:08:38 PM [mysql] improper privileges, a crash, or a shutdown by another method.
12:08:38 PM [mysql] Press the Logs button to view error logs and check
12:08:38 PM [mysql] the Windows Event Viewer for more clues
12:08:38 PM [mysql] If you need more help, copy and post this
12:08:38 PM [mysql] entire log window on the forums


Error log for this time:

2023-11-27 15:05:49 0 [Note] InnoDB: Buffer pool(s) load completed at 231127 15:05:49
2023-11-27 15:05:49 0 [Note] Server socket created on IP: '::'.
2023-11-28 12:08:38 0 [Note] Starting MariaDB 10.4.32-MariaDB source revision c4143f909528e3fab0677a28631d10389354c491 as process 12688
2023-11-28 12:08:38 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2023-11-28 12:08:38 0 [Note] InnoDB: Uses event mutexes
2023-11-28 12:08:38 0 [Note] InnoDB: Compressed tables use zlib 1.3
2023-11-28 12:08:38 0 [Note] InnoDB: Number of pools: 1
2023-11-28 12:08:38 0 [Note] InnoDB: Using SSE2 crc32 instructions
2023-11-28 12:08:38 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2023-11-28 12:08:38 0 [Note] InnoDB: Completed initialization of buffer pool
2023-11-28 12:08:38 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=605645
2023-11-28 12:08:38 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2023-11-28 12:08:38 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2023-11-28 12:08:38 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2023-11-28 12:08:38 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2023-11-28 12:08:38 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2023-11-28 12:08:38 0 [Note] InnoDB: Waiting for purge to start
2023-11-28 12:08:38 0 [Note] InnoDB: 10.4.32 started; log sequence number 605654; transaction id 495
2023-11-28 12:08:38 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2023-11-28 12:08:38 0 [Note] Plugin 'FEEDBACK' is disabled.
2023-11-28 12:08:38 0 [Note] InnoDB: Buffer pool(s) load completed at 231128 12:08:38
2023-11-28 12:08:38 0 [Note] Server socket created on IP: '::'.


In the windows event log the only thing I see is
Using unique option prefix 'key_buffer' is error-prone and can break in the future. Please use the full name 'key_buffer_size' instead.

Say what you will about Sisyphus. He always has work.
Ag2000
 
Posts: 14
Joined: 26. November 2023 02:09
XAMPP version: 8.2.12
Operating System: windows 11

Re: mySQL file error

Postby Ag2000 » 28. November 2023 20:44

After posting I am not in again! Any suggestions were to look?
Say what you will about Sisyphus. He always has work.
Ag2000
 
Posts: 14
Joined: 26. November 2023 02:09
XAMPP version: 8.2.12
Operating System: windows 11

Re: mySQL file error

Postby kahve6 » 01. December 2023 02:33

Hi, I've got this issue when I added new user for mySQL with all privileges. Have you done anything like this?
I solved my problem by taking backup of my data folder and using "mysql/backup" folder as new data folder. I took this as an opportunity to update xampp too but before that, I've checked and it's fixed. If you want to start fresh and not to lose data, which folders and files that you should delete or copy, you can find a knowledge with a quick search. INFO files or log files can be erasable or not according to specific problems though. Maybe it didn't help you but I shared my experience. Good luck!
kahve6
 
Posts: 1
Joined: 01. December 2023 02:05
XAMPP version: 8.2.12
Operating System: Windows

Re: mySQL file error

Postby Nobbie » 01. December 2023 14:14

If you want to avoid crashing your database regularly (a well known problem for many years and surely asked over a 1.000 times in this forum), you should run MariaDB as a Windows Service (a cross in the the first column of Xampp Control Dialog before MariaDB)). You should run Apache as Service as well.

The Services are started and shutdown properly by Windows, but keep in mind, that now MariaDB and Apache are run with "System" UserID instead of your own UserID (which may lead to file right problems, mostly if you installed Xampp to a folder in your User space).

As long as you start and stop MariaDB manually (or even by simply switching off the PC) you will have dataloss.
Nobbie
 
Posts: 13176
Joined: 09. March 2008 13:04

Re: mySQL file error

Postby Ag2000 » 01. December 2023 21:16

Nobbie wrote:I you should run MariaDB as a Windows Service (a cross in the the first column of Xampp Control Dialog before MariaDB)).


Do you mean as below?

Image
Say what you will about Sisyphus. He always has work.
Ag2000
 
Posts: 14
Joined: 26. November 2023 02:09
XAMPP version: 8.2.12
Operating System: windows 11

Re: mySQL file error

Postby Nobbie » 02. December 2023 00:06

Yes.
Nobbie
 
Posts: 13176
Joined: 09. March 2008 13:04

Re: mySQL file error

Postby Ag2000 » 02. December 2023 01:05

Thanks for the validation. Experience of others is always good.
Say what you will about Sisyphus. He always has work.
Ag2000
 
Posts: 14
Joined: 26. November 2023 02:09
XAMPP version: 8.2.12
Operating System: windows 11


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 192 guests