MySQL shuts down unexpectedly

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

MySQL shuts down unexpectedly

Postby Xargreyhawk » 08. August 2021 15:29

Hi all, newbie here :) I've been using XAMPP for a few months (to run a local installation of MediaWiki), and I've been able to run the Apache and MySQL servers without any issue on the original ports. However, since yesterday, I keep getting this error message:

Code: Select all
16:26:45  [mysql]    Attempting to start MySQL app...
16:26:46  [mysql]    Status change detected: running
16:26:47  [mysql]    Status change detected: stopped
16:26:47  [mysql]    Error: MySQL shutdown unexpectedly.
16:26:47  [mysql]    This may be due to a blocked port, missing dependencies,
16:26:47  [mysql]    improper privileges, a crash, or a shutdown by another method.
16:26:47  [mysql]    Press the Logs button to view error logs and check
16:26:47  [mysql]    the Windows Event Viewer for more clues
16:26:47  [mysql]    If you need more help, copy and post this
16:26:47  [mysql]    entire log window on the forums


I went into the mySQL log file and I found this log:

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


I have no idea why this is suddenly doing this - I haven't updated Windows, nor have I updated XAMPP itself (truth be told, I'd be a little worried to do so, since it took me several hours to ensure my MediaWiki would start and run smoothly on XAMPP, so I have no desire to do it all again). Can anyone help?

Thank you so much!
Xargreyhawk
 
Posts: 3
Joined: 08. August 2021 15:26
XAMPP version: 8.0.8
Operating System: Windows 10

Re: MySQL shuts down unexpectedly

Postby Altrea » 08. August 2021 19:37

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: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: MySQL shuts down unexpectedly

Postby Xargreyhawk » 08. July 2022 08:02

Somehow the issue fixed itself back then, but now I am having it again. The MySQL log reads:

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


I tried to open MariaDB with the command string provided above and I got this:

Code: Select all
2022-07-08  9:02:43 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.
2022-07-08  9:02:43 0 [Note] mysqld (mysqld 10.4.20-MariaDB) starting as process 25932 ...
2022-07-08  9:02:43 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2022-07-08  9:02:43 0 [Note] InnoDB: Uses event mutexes
2022-07-08  9:02:43 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2022-07-08  9:02:43 0 [Note] InnoDB: Number of pools: 1
2022-07-08  9:02:43 0 [Note] InnoDB: Using SSE2 crc32 instructions
2022-07-08  9:02:43 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2022-07-08  9:02:43 0 [Note] InnoDB: Completed initialization of buffer pool
2022-07-08  9:02:43 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2022-07-08  9:02:43 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2022-07-08  9:02:43 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2022-07-08  9:02:43 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2022-07-08  9:02:43 0 [Note] InnoDB: Waiting for purge to start
2022-07-08  9:02:43 0 [Note] InnoDB: 10.4.20 started; log sequence number 2044849438; transaction id 977472
2022-07-08  9:02:43 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2022-07-08  9:02:43 0 [Note] Plugin 'FEEDBACK' is disabled.
2022-07-08  9:02:43 0 [Note] Server socket created on IP: '::'.
2022-07-08  9:02:43 7 [Note] Reading Master_info: 'master-2022@002d03@002d23@002010@003a36@003a43@00200@0020@005bnote@005d@0020reading@0020of@0020all@0020master_info@0020entries@0020succeeded@000d.info'  Relay_info:'relay-log-2022@002d03@002d23@002010@003a36@003a43@00200@0020@005bnote@005d@0020reading@0020of@0020all@0020master_info@0020entries@0020succeeded@000d.info'
2022-07-08  9:02:43 7 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MariaDB server acts as a replica and has its hostname changed. Please use '--log-basename=#' or '--relay-log=mysql-relay-bin' to avoid this problem.
2022-07-08  9:02:43 0 [Note] InnoDB: Buffer pool(s) load completed at 220708  9:02:43
2022-07-08  9:02:43 7 [ERROR] Failed to open the relay log '.\mysql-relay-bin-2022@002d03@002d23@002010@003a36@003a43@00200@0020@005bnote@005d@0020reading@0020of@0020all@0020master_info@0020entries@0020succeeded@000d.000001' (relay_log_pos 4)
2022-07-08  9:02:43 7 [ERROR] Could not find target log during relay log initialization
2022-07-08  9:02:43 7 [ERROR] Initialized Master_info from 'master-2022@002d03@002d23@002010@003a36@003a43@00200@0020@005bnote@005d@0020reading@0020of@0020all@0020master_info@0020entries@0020succeeded@000d.info' failed
2022-07-08  9:02:43 7 [Note] Added new Master_info '2022-03-23 10:36:43 0 [Note] Reading of all Master_info entries succ' to hash table
2022-07-08  9:02:43 7 [Note] Reading Master_info: 'master-2022@002d03@002d23@002010@003a36@003a43@00200@0020@005bnote@005d@0020added@0020new@0020master_info@0020@0027@0027@0020to@0020hash@0020table@000d.info'  Relay_info:'relay-log-2022@002d03@002d23@002010@003a36@003a43@00200@0020@005bnote@005d@0020added@0020new@0020master_info@0020@0027@0027@0020to@0020hash@0020table@000d.info'
2022-07-08  9:02:43 7 [Note] Initialized Master_info from 'master-2022@002d03@002d23@002010@003a36@003a43@00200@0020@005bnote@005d@0020added@0020new@0020master_info@0020@0027@0027@0020to@0020hash@0020table@000d.info'
' to hash table2:43 7 [Note] Added new Master_info '2022-03-23 10:36:43 0 [Note] Added new Master_info '' to hash table
': Slave I/O thread: Start asynchronous replication to master '@:3306' in log '' at position 4hash table
': Slave I/O: Fatal error: Invalid (empty) username when attempting to connect to the master server. Connection attempt terminated. Internal MariaDB error code: 1593
2022-07-08  9:02:43 7 [Note] Started replication for '2022-03-23 10:36:43 0 [Note] Added new Master_info '' to hash tabl'
': Slave SQL thread initialized, starting replication in log 'FIRST' at position 0, relay log '.\mysql-relay-bin-2022@002d03@002d23@002010@003a36@003a43@00200@0020@005bnote@005d@0020added@0020new@0020master_info@0020@0027@0027@0020to@0020hash@0020table@000d.000001' position: 4
': Slave I/O thread killed while connecting to master:43 0 [Note] Added new Master_info '' to hash table
2022-07-08  9:02:43 7 [Note] Reading Master_info: 'master-2022@002d03@002d23@002010@003a36@003a43@00200@0020@005bnote@005d@0020c@003a@005cxampp@005cmysql@005cbin@005cmysqld@002eexe@003a@0020ready@0020for@0020connections@002e@000d.info'  Relay_info:'relay-log-2022@002d03@002d23@002010@003a36@003a43@00200@0020@005bnote@005d@0020c@003a@005cxampp@005cmysql@005cbin@005cmysqld@002eexe@003a@0020ready@0020for@0020connections@002e@000d.info'
': Slave I/O thread exiting, read up to log 'FIRST', position 4e] Added new Master_info '' to hash table
': master was :3306 8 [Note] Master '2022-03-23 10:36:43 0 [Note] Added new Master_info '' to hash table
2022-07-08  9:02:43 7 [Note] Initialized Master_info from 'master-2022@002d03@002d23@002010@003a36@003a43@00200@0020@005bnote@005d@0020c@003a@005cxampp@005cmysql@005cbin@005cmysqld@002eexe@003a@0020ready@0020for@0020connections@002e@000d.info'
2022-07-08  9:02:43 7 [Note] Added new Master_info '2022-03-23 10:36:43 0 [Note] c:\xampp\mysql\bin\mysqld.exe: ready fo' to hash table
': Slave I/O thread: Start asynchronous replication to master '@:3306' in log '' at position 4xe: ready for connections.
2022-07-08  9:02:43 10 [ERROR] Master '2022-03-23 10:36:43 0 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections': Slave I/O: Fatal error: Invalid (empty) username when attempting to connect to the master server. Connection attempt terminated. Internal MariaDB error code: 1593
2022-07-08  9:02:43 7 [Note] Started replication for '2022-03-23 10:36:43 0 [Note] c:\xampp\mysql\bin\mysqld.exe: ready 'or connections.
': Slave I/O thread killed while connecting to master6:43 0 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections.
': Slave SQL thread initialized, starting replication in log 'FIRST' at position 0, relay log '.\mysql-relay-bin-2022@002d03@002d23@002010@003a36@003a43@00200@0020@005bnote@005d@0020c@003a@005cxampp@005cmysql@005cbin@005cmysqld@002eexe@003a@0020ready@0020for@0020connections@002e@000d.000001' position: 4
2022-07-08  9:02:43 7 [Note] Reading Master_info: 'master-version@003a@0020@002710@002e4@002e20@002dmariadb@0027@0020@0020socket@003a@0020@0027@0027@0020@0020port@003a@00203306@0020@0020mariadb@002eorg@0020binary@0020distribution@000d.info'  Relay_info:'relay-log-version@003a@0020@002710@002e4@002e20@002dmariadb@0027@0020@0020socket@003a@0020@0027@0027@0020@0020port@003a@00203306@0020@0020mariadb@002eorg@0020binary@0020distribution@000d.info'
': Slave I/O thread exiting, read up to log 'FIRST', position 4te] c:\xampp\mysql\bin\mysqld.exe: ready for connections.
': master was :3306 10 [Note] Master '2022-03-23 10:36:43 0 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections.
2022-07-08  9:02:43 7 [Note] Initialized Master_info from 'master-version@003a@0020@002710@002e4@002e20@002dmariadb@0027@0020@0020socket@003a@0020@0027@0027@0020@0020port@003a@00203306@0020@0020mariadb@002eorg@0020binary@0020distribution@000d.info'
2022-07-08  9:02:43 7 [Note] Added new Master_info 'Version: '10.4.20-MariaDB'  socket: ''  port: 3306  mariadb.org bina' to hash table
2022-07-08  9:02:43 12 [Note] Master 'Version: '10.4.20-MariaDB'  socket: ''  port: 3306  mariadb.org binary distributio': Slave I/O thread: Start asynchronous replication to master '@:3306' in log '' at position 4
2022-07-08  9:02:43 12 [ERROR] Master 'Version: '10.4.20-MariaDB'  socket: ''  port: 3306  mariadb.org binary distributi': Slave I/O: Fatal error: Invalid (empty) username when attempting to connect to the master server. Connection attempt terminated. Internal MariaDB error code: 1593
2022-07-08  9:02:43 7 [Note] Started replication for 'Version: '10.4.20-MariaDB'  socket: ''  port: 3306  mariadb.org bi'ary distribution
2022-07-08  9:02:43 13 [Note] Master 'Version: '10.4.20-MariaDB'  socket: ''  port: 3306  mariadb.org binary distributio': Slave SQL thread initialized, starting replication in log 'FIRST' at position 0, relay log '.\mysql-relay-bin-version@003a@0020@002710@002e4@002e20@002dmariadb@0027@0020@0020socket@003a@0020@0027@0027@0020@0020port@003a@00203306@0020@0020mariadb@002eorg@0020binary@0020distribution@000d.000001' position: 4
2022-07-08  9:02:43 12 [Note] Master 'Version: '10.4.20-MariaDB'  socket: ''  port: 3306  mariadb.org binary distributio': Slave I/O thread killed while connecting to master
2022-07-08  9:02:43 0 [Warning] Reading of some Master_info entries failed
2022-07-08  9:02:43 12 [Note] Master 'Version: '10.4.20-MariaDB'  socket: ''  port: 3306  mariadb.org binary distributio': Slave I/O thread exiting, read up to log 'FIRST', position 4
2022-07-08  9:02:43 0 [ERROR] Failed to initialize multi master structures
2022-07-08  9:02:43 12 [Note] Master 'Version: '10.4.20-MariaDB'  socket: ''  port: 3306  mariadb.org binary distributio': master was :3306
2022-07-08  9:02:43 0 [ERROR] Aborting


What can I do to fix the issue?
Xargreyhawk
 
Posts: 3
Joined: 08. August 2021 15:26
XAMPP version: 8.0.8
Operating System: Windows 10

Re: MySQL shuts down unexpectedly

Postby Xargreyhawk » 08. July 2022 08:15

Actually, I think I solved this myself. I noticed that the MariaDB log posted above included the following:

Code: Select all
2022-07-08  9:02:43 12 [ERROR] Master 'Version: '10.4.20-MariaDB'  socket: ''  port: 3306  mariadb.org binary distributi': Slave I/O: Fatal error: Invalid (empty) username when attempting to connect to the master server. Connection attempt terminated. Internal MariaDB error code: 1593
2022-07-08  9:02:43 7 [Note] Started replication for 'Version: '10.4.20-MariaDB'  socket: ''  port: 3306  mariadb.org bi'ary distribution
2022-07-08  9:02:43 13 [Note] Master 'Version: '10.4.20-MariaDB'  socket: ''  port: 3306  mariadb.org binary distributio': Slave SQL thread initialized, starting replication in log 'FIRST' at position 0, relay log '.\mysql-relay-bin-version@003a@0020@002710@002e4@002e20@002dmariadb@0027@0020@0020socket@003a@0020@0027@0027@0020@0020port@003a@00203306@0020@0020mariadb@002eorg@0020binary@0020distribution@000d.000001' position: 4
2022-07-08  9:02:43 12 [Note] Master 'Version: '10.4.20-MariaDB'  socket: ''  port: 3306  mariadb.org binary distributio': Slave I/O thread killed while connecting to master


I'm posting the solution that worked for me, in case anyone needs it. I went into my xampp/mysql/data folder and deleted the "multi-master.info" file, as well as all files which began with "master-" . I shut down all instances of XAMPP Control Panel, restarted it, and now MySQL loads properly.

I also found a Stack Overflow thread on the error reported in the MariaDB code above, if it can help (it's for Xampp 3.2.1, but it likely still applies): https://stackoverflow.com/questions/50999358/xampp-mysql-not-starting-mysql-not-starting-on-xampp-3-2-1-version
Xargreyhawk
 
Posts: 3
Joined: 08. August 2021 15:26
XAMPP version: 8.0.8
Operating System: Windows 10


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 158 guests