MySQL Starts and then Stops

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

MySQL Starts and then Stops

Postby mrmwood » 31. October 2021 05:29

I was working on XAMPP last night at home, I came in to work this morning (I work as a teacher at a school) and now each time I start the MySQL Service it starts and then immediately stops.

This is the error log:

08:23:15 [main] Initializing Control Panel
08:23:15 [main] Windows Version: Enterprise 64-bit
08:23:15 [main] XAMPP Version: 8.0.10
08:23:15 [main] Control Panel Version: 3.3.0 [ Compiled: Apr 6th 2021 ]
08:23:15 [main] You are not running with administrator rights! This will work for
08:23:15 [main] most application stuff but whenever you do something with services
08:23:15 [main] there will be a security dialogue or things will break! So think
08:23:15 [main] about running this application with administrator rights!
08:23:15 [main] XAMPP Installation Directory: "c:\xampp\"
08:23:15 [main] Checking for prerequisites
08:23:17 [main] All prerequisites found
08:23:17 [main] Initializing Modules
08:23:17 [main] Starting Check-Timer
08:23:17 [main] Control Panel Ready
08:23:52 [Apache] Attempting to start Apache app...
08:23:53 [Apache] Status change detected: running
08:23:59 [mysql] Attempting to start MySQL app...
08:23:59 [mysql] Status change detected: running
08:24:01 [mysql] Status change detected: stopped
08:24:01 [mysql] Error: MySQL shutdown unexpectedly.
08:24:01 [mysql] This may be due to a blocked port, missing dependencies,
08:24:01 [mysql] improper privileges, a crash, or a shutdown by another method.
08:24:01 [mysql] Press the Logs button to view error logs and check
08:24:01 [mysql] the Windows Event Viewer for more clues
08:24:01 [mysql] If you need more help, copy and post this
08:24:01 [mysql] entire log window on the forums


Please help, how do I fix this?
mrmwood
 
Posts: 3
Joined: 31. October 2021 05:26
XAMPP version: 3.3.0
Operating System: Windows

Re: MySQL Starts and then Stops

Postby Altrea » 31. October 2021 08:14

Hi,

This log does not contain any errors.

Try to start MariaDB as console application in XAMPP Shell with the following command and tell us what it responses.
Code: Select all
mysqld --defaults-file=mysql\bin\my.ini --standalone --console
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11933
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: MySQL Starts and then Stops

Postby mrmwood » 31. October 2021 09:00

It gave back this.....



Setting environment for using XAMPP for Windows.
Mark.Wood@DCSP7-73 c:\xampp
# mysqld --defaults-file=mysql\bin\my.ini --standalone --console
2021-10-31 12:06:02 0 [Note] Using unique option prefix 'key_buffer' is error-prone and can break in the future. Please use the full name 'key_buffer_size' instead.
2021-10-31 12:06:02 0 [Note] mysqld (mysqld 10.4.21-MariaDB) starting as process 3368 ...
2021-10-31 12:06:02 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2021-10-31 12:06:02 0 [Note] InnoDB: Uses event mutexes
2021-10-31 12:06:02 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-10-31 12:06:02 0 [Note] InnoDB: Number of pools: 1
2021-10-31 12:06:02 0 [Note] InnoDB: Using SSE2 crc32 instructions
2021-10-31 12:06:02 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2021-10-31 12:06:02 0 [Note] InnoDB: Completed initialization of buffer pool
2021-10-31 12:06:02 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2021-10-31 12:06:02 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2021-10-31 12:06:02 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2021-10-31 12:06:02 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2021-10-31 12:06:02 0 [Note] InnoDB: Waiting for purge to start
2021-10-31 12:06:02 0 [Note] InnoDB: 10.4.21 started; log sequence number 941819; transaction id 847
2021-10-31 12:06:02 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2021-10-31 12:06:02 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-10-31 12:06:02 0 [Note] Server socket created on IP: '::'.
2021-10-31 12:06:02 0 [ERROR] mysqld: Table '.\mysql\db' is marked as crashed and last (automatic?) repair failed
2021-10-31 12:06:02 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table '.\mysql\db' is marked as crashed and last (automatic?) repair failed
2021-10-31 12:06:02 0 [ERROR] Aborting

Mark.Wood@DCSP7-73 c:\xampp
#
mrmwood
 
Posts: 3
Joined: 31. October 2021 05:26
XAMPP version: 3.3.0
Operating System: Windows

Re: MySQL Starts and then Stops

Postby Altrea » 31. October 2021 09:49

mrmwood wrote:2021-10-31 12:06:02 0 [ERROR] mysqld: Table '.\mysql\db' is marked as crashed and last (automatic?) repair failed
2021-10-31 12:06:02 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table '.\mysql\db' is marked as crashed and last (automatic?) repair failed
2021-10-31 12:06:02 0 [ERROR] Aborting

your mysql database needs to be repaired.

To do this please open the XAMPP Shell by clicking the Shell button in your XAMPP Control Panel and execute the following command:
Code: Select all
mysqld --console --skip-grant-tables --skip-external-locking


Leave this black command line window open and click on the Shell button in the Control Panel again to open a second command line window and execute this command:
Code: Select all
mysqlcheck -r --databases mysql --use-frm


After that you Can close both command line Windows and try to start mysql again normally from your XAMPP control panel
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11933
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: MySQL Starts and then Stops

Postby mrmwood » 31. October 2021 12:11

:-) That worked, thank you VERY much
mrmwood
 
Posts: 3
Joined: 31. October 2021 05:26
XAMPP version: 3.3.0
Operating System: Windows


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 150 guests