unable to start mysql

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

unable to start mysql

Postby franji » 11. November 2022 03:19

It worked yesterday but today I am unable to get mysql to start in XAMPP control panel.
The panels tells me:
1:17:55 PM [main] Initializing Control Panel
1:17:55 PM [main] Windows Version: Enterprise 64-bit
1:17:55 PM [main] XAMPP Version: 8.1.10
1:17:55 PM [main] Control Panel Version: 3.3.0 [ Compiled: Apr 6th 2021 ]
1:17:55 PM [main] Running with Administrator rights - good!
1:17:55 PM [main] XAMPP Installation Directory: "c:\xampp\"
1:17:55 PM [main] Checking for prerequisites
1:17:55 PM [main] All prerequisites found
1:17:55 PM [main] Initializing Modules
1:17:55 PM [Apache] XAMPP Apache is already running on port 80
1:17:55 PM [Apache] XAMPP Apache is already running on port 443
1:17:55 PM [main] Starting Check-Timer
1:17:55 PM [main] Control Panel Ready
1:18:01 PM [mysql] Attempting to start MySQL app...
1:18:01 PM [mysql] Status change detected: running
1:18:03 PM [mysql] Status change detected: stopped
1:18:03 PM [mysql] Error: MySQL shutdown unexpectedly.
1:18:03 PM [mysql] This may be due to a blocked port, missing dependencies,
1:18:03 PM [mysql] improper privileges, a crash, or a shutdown by another method.
1:18:03 PM [mysql] Press the Logs button to view error logs and check
1:18:03 PM [mysql] the Windows Event Viewer for more clues
1:18:03 PM [mysql] If you need more help, copy and post this
1:18:03 PM [mysql] entire log window on the forums


The log says:
2022-11-11 13:18:01 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2022-11-11 13:18:01 0 [Note] InnoDB: Uses event mutexes
2022-11-11 13:18:01 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2022-11-11 13:18:01 0 [Note] InnoDB: Number of pools: 1
2022-11-11 13:18:01 0 [Note] InnoDB: Using SSE2 crc32 instructions
2022-11-11 13:18:01 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2022-11-11 13:18:01 0 [Note] InnoDB: Completed initialization of buffer pool
2022-11-11 13:18:01 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2022-11-11 13:18:01 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2022-11-11 13:18:01 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2022-11-11 13:18:01 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2022-11-11 13:18:01 0 [Note] InnoDB: Waiting for purge to start
2022-11-11 13:18:01 0 [Note] InnoDB: 10.4.25 started; log sequence number 6846090; transaction id 7012
2022-11-11 13:18:01 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2022-11-11 13:18:01 0 [Note] Plugin 'FEEDBACK' is disabled.
2022-11-11 13:18:01 0 [Note] Server socket created on IP: '::'.


I've investigated everything I can think of but to no avail. If you know what the problem is please do tell me how to get out of this muddle.
Thanks,
Fran
franji
 
Posts: 4
Joined: 08. November 2022 03:49
XAMPP version: 3.3.0
Operating System: Windows 11

Re: unable to start mysql

Postby Froosh » 12. November 2022 15:08

You are likely running MySQL as a regular Windows process rather than a Windows service. Running MySQL as a regular process is problematic, in my experience.

If you search these forums, you should be able to find a solution related to fixing/recovering the likely crashed databases. My first approach would be to backup the files currently in the mysql/data folder, and attempt to recover the databases from the command line, there are a number of approaches to doing this, and you should find one that matches your situation based on the logs.

The other ways to deal with this are restoring the databases from a backup, assuming you have them available, or if the current database contents are unimportant, you could just replace the content in the mysql/data directory with the contents from the mysql/backup, though that would be my last resort.

Once you have the database issue resolved, I highly recommend you configure MySQL to run as a Windows Service. My system is configured this way and has been trouble free since I made that change. And, I also have regular backups just in case.
User avatar
Froosh
 
Posts: 138
Joined: 27. March 2022 17:56
XAMPP version: 8.2.0
Operating System: Windows 11 Pro

Re: unable to start mysql

Postby franji » 14. November 2022 00:24

Thanks Froosh,
I was finally able to figure out how to fix things which was to use a backup. I think I'd shut things down improperly causing the glitch in the database. All good now.
However, I'm wondering about how to configure MySQL to run as a Windows Service. The only SQL that I seem to have is the one that comes in the XAMPP package. Is that what I should try and configure? Or should I have a different MySQL installed? Suggestions very welcome.
Thanks,
Fran
franji
 
Posts: 4
Joined: 08. November 2022 03:49
XAMPP version: 3.3.0
Operating System: Windows 11

Postby Froosh » 14. November 2022 15:03

Assuming you did not separately install MySQL, or use another application that included MySQL, then open the XAMPP Control Panel and check the box to the left of the MySQL entry under "Service". I believe you must be running the XAMPP Control Panel as an administrator to make this change. You can also configure the other parts of XAMPP, such as Apache to run as Windows Services, if you want, but MySQL is the important one here.
User avatar
Froosh
 
Posts: 138
Joined: 27. March 2022 17:56
XAMPP version: 8.2.0
Operating System: Windows 11 Pro


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 196 guests