Error: MySQL shutdown unexpectedly.

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

Error: MySQL shutdown unexpectedly.

Postby computergenius » 01. October 2020 23:40

I don't remember changing anything on the computer, but this worked until yesterday.

I don't know if it's relevant, but after re-starting the computer, I can't rename the Xampp folder, as something is running in it. I am on Windows 10, and don't see anything in Task Manager -> Processes -> Background Processes.

The XAMPP Control Panel V3.2.4 tells me:
00:25:33 [main] Initializing Control Panel
00:25:33 [main] Windows Version: Enterprise 64-bit
00:25:33 [main] XAMPP Version: 7.4.9
00:25:33 [main] Control Panel Version: 3.2.4 [ Compiled: Jun 5th 2019 ]
00:25:33 [main] You are not running with administrator rights! This will work for
00:25:33 [main] most application stuff but whenever you do something with services
00:25:33 [main] there will be a security dialogue or things will break! So think
00:25:33 [main] about running this application with administrator rights!
00:25:33 [main] XAMPP Installation Directory: "d:\xampp3\"
00:25:33 [main] Checking for prerequisites
00:25:33 [main] All prerequisites found
00:25:33 [main] Initializing Modules
00:25:33 [main] Enabling autostart for module "Apache"
00:25:33 [main] Enabling autostart for module "MySQL"
00:25:33 [main] Starting Check-Timer
00:25:33 [main] Control Panel Ready
00:25:34 [Apache] Autostart active: starting...
00:25:34 [Apache] Attempting to start Apache app...
00:25:34 [mysql] Autostart active: starting...
00:25:34 [mysql] Attempting to start MySQL app...
00:25:34 [Apache] Status change detected: running
00:25:34 [mysql] Status change detected: running
00:25:36 [mysql] Status change detected: stopped
00:25:36 [mysql] Error: MySQL shutdown unexpectedly.
00:25:36 [mysql] This may be due to a blocked port, missing dependencies,
00:25:36 [mysql] improper privileges, a crash, or a shutdown by another method.
00:25:36 [mysql] Press the Logs button to view error logs and check
00:25:36 [mysql] the Windows Event Viewer for more clues
00:25:36 [mysql] If you need more help, copy and post this
00:25:36 [mysql] entire log window on the forums

Can anyone give me a clue, please
computergenius
 
Posts: 15
Joined: 02. March 2019 13:47
XAMPP version: 3.2.4
Operating System: Windows 10

Re: Error: MySQL shutdown unexpectedly.

Postby computergenius » 02. October 2020 10:21

In the absence of any suggestions, I renamed the XAMPP folder - D:\xampp3 to D:\xampp3xxx - this required a Windows restart in safe mode, as Windows could not rename the folder due to something being "open" - which I couldn't find.

I then re-installed XAMPP into a new D: \xampp3 folder. Apache and MySQL started without an issue.

However, I had now "lost" all my data. So I renamed D:\xampp3\mysql\data to D:\xampp3\mysql\dataxxx, then copied all the data folder from D:\xampp3xxx\mysql\data to D:\xampp3\mysql\data - so that all the data from yesterday morning should now be in the new data folder.

Start MYSQL, and got the same error message as before:
11:07:07 [mysql] Error: MySQL shutdown unexpectedly.
11:07:07 [mysql] This may be due to a blocked port, missing dependencies,
11:07:07 [mysql] improper privileges, a crash, or a shutdown by another method.
11:07:07 [mysql] Press the Logs button to view error logs and check
11:07:07 [mysql] the Windows Event Viewer for more clues
11:07:07 [mysql] If you need more help, copy and post this
11:07:07 [mysql] entire log window on the forums

mysql_error.log shows
InnoDB: using atomic writes.
2020-10-02 11:07:05 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2020-10-02 11:07:05 0 [Note] InnoDB: Uses event mutexes
2020-10-02 11:07:05 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-10-02 11:07:05 0 [Note] InnoDB: Number of pools: 1
2020-10-02 11:07:05 0 [Note] InnoDB: Using SSE2 crc32 instructions
2020-10-02 11:07:05 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2020-10-02 11:07:05 0 [Note] InnoDB: Completed initialization of buffer pool
2020-10-02 11:07:06 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2020-10-02 11:07:06 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-10-02 11:07:06 0 [Note] InnoDB: Setting file 'D:\xampp3\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-10-02 11:07:06 0 [Note] InnoDB: File 'D:\xampp3\mysql\data\ibtmp1' size is now 12 MB.
2020-10-02 11:07:06 0 [Note] InnoDB: Waiting for purge to start
2020-10-02 11:07:06 0 [Note] InnoDB: 10.4.14 started; log sequence number 1310059841; transaction id 9
2020-10-02 11:07:06 0 [Note] InnoDB: Loading buffer pool(s) from D:\xampp3\mysql\data\ib_buffer_pool
2020-10-02 11:07:06 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-10-02 11:07:06 0 [Note] InnoDB: Buffer pool(s) load completed at 201002 11:07:06
2020-10-02 11:07:06 0 [Note] Server socket created on IP: '::'.

Prior to moving the data, when there was no data in the new installation, the error log was
InnoDB: using atomic writes.
2020-10-02 10:42:06 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2020-10-02 10:42:06 0 [Note] InnoDB: Uses event mutexes
2020-10-02 10:42:06 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-10-02 10:42:06 0 [Note] InnoDB: Number of pools: 1
2020-10-02 10:42:06 0 [Note] InnoDB: Using SSE2 crc32 instructions
2020-10-02 10:42:06 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2020-10-02 10:42:06 0 [Note] InnoDB: Completed initialization of buffer pool
2020-10-02 10:42:06 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2020-10-02 10:42:06 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-10-02 10:42:06 0 [Note] InnoDB: Setting file 'D:\xampp3\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-10-02 10:42:06 0 [Note] InnoDB: File 'D:\xampp3\mysql\data\ibtmp1' size is now 12 MB.
2020-10-02 10:42:06 0 [Note] InnoDB: Waiting for purge to start
2020-10-02 10:42:06 0 [Note] InnoDB: 10.4.14 started; log sequence number 1310059832; transaction id 9
2020-10-02 10:42:06 0 [Note] InnoDB: Loading buffer pool(s) from D:\xampp3\mysql\data\ib_buffer_pool
2020-10-02 10:42:06 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-10-02 10:42:06 0 [Note] InnoDB: Buffer pool(s) load completed at 201002 10:42:06
2020-10-02 10:42:06 0 [Note] Server socket created on IP: '::'.

So it appears that a) there is something wrong in the data folder, and b) the log is the same when working without data, as it is when crashing with data - with the exception of the log sequence number.

Any suggestions?
computergenius
 
Posts: 15
Joined: 02. March 2019 13:47
XAMPP version: 3.2.4
Operating System: Windows 10

Re: Error: MySQL shutdown unexpectedly.

Postby computergenius » 02. October 2020 21:42

Still struggling on. I have now created a completely new installation, in a different folder, D:/xampp4. Earlier attempts, including the original folder that I was using, have been renamed by adding xxx to the end of the folder name.

So now, I can't switch Apache on.

And, I can't switch MySQL off, either with the Control Panel, or the line
cmd.exe /C start "" /MIN call "D:\xampp4\killprocess.bat" "mysqld.exe"

The Mysql text disappears from Control Panel - but use SQLYog, I can still see that data, even though I don't start SQLYog until after I have "shut down" MySQL.

Finally - reboot the machine - and MySQL is *still there*

Please, someone must have an idea of what is wrong.
computergenius
 
Posts: 15
Joined: 02. March 2019 13:47
XAMPP version: 3.2.4
Operating System: Windows 10

Re: Error: MySQL shutdown unexpectedly.

Postby computergenius » 02. October 2020 22:04

OK, you can stop worrying now, guys (:->

I seem to have it fixed. I had missed the change of folder name from a couple of conf files. It now looks to be working.

But, as I couldn't get the original folder to work, with some data files - is there any way to extract the data from the frm, myd, myi / frm, ibd files in the data folders?
computergenius
 
Posts: 15
Joined: 02. March 2019 13:47
XAMPP version: 3.2.4
Operating System: Windows 10

Re: Error: MySQL shutdown unexpectedly.

Postby JJ_Tagy » 03. October 2020 16:11

If you installed the same MySQL/MariaDB version, you should be able to replace the whole folder. However, it is always recommended to run the old version and do a SQL dump and import that into your new installation.
JJ_Tagy
 
Posts: 788
Joined: 30. January 2012 13:44
XAMPP version: 5.5.15
Operating System: Windows 10 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 114 guests