MySQL shutdown unexpectedly

Irgendwelche Probleme mit XAMPP für Windows? Dann ist hier genau der richtige Ort um nachzufragen.

MySQL shutdown unexpectedly

Postby diesdas » 20. July 2022 10:28

Gestern habe ich alles noch verwendet und keine Probleme gehabt, heute bekomme ich beim starten des mySQL über XAMPP folgende Meldung:

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


bei diesem Shell-Befehl
Code: Select all
mysqld --defaults-file=mysql\bin\my.ini --standalone --console


habe ich dann folgendes erhalten:

Code: Select all
2022-07-20 11:32:51 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-20 11:32:51 0 [Note] mysqld (mysqld 10.4.24-MariaDB) starting as process 9224 ...
2022-07-20 11:32:51 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2022-07-20 11:32:51 0 [Note] InnoDB: Uses event mutexes
2022-07-20 11:32:51 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2022-07-20 11:32:51 0 [Note] InnoDB: Number of pools: 1
2022-07-20 11:32:51 0 [Note] InnoDB: Using SSE2 crc32 instructions
2022-07-20 11:32:51 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2022-07-20 11:32:51 0 [Note] InnoDB: Completed initialization of buffer pool
2022-07-20 11:32:51 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2022-07-20 11:32:51 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2022-07-20 11:32:51 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2022-07-20 11:32:51 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2022-07-20 11:32:51 0 [Note] InnoDB: Waiting for purge to start
2022-07-20 11:32:51 0 [Note] InnoDB: 10.4.24 started; log sequence number 399437; transaction id 521
2022-07-20 11:32:51 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2022-07-20 11:32:51 0 [Note] Plugin 'FEEDBACK' is disabled.
2022-07-20 11:32:51 0 [Note] Server socket created on IP: '::'.
2022-07-20 11:32:51 0 [ERROR] mysqld: Table '.\mysql\db' is marked as crashed and last (automatic?) repair failed
2022-07-20 11:32:51 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table '.\mysql\db' is marked as crashed and last (automatic?) repair failed
2022-07-20 11:32:51 0 [ERROR] Aborting


habe dann über die Shell mit

Code: Select all
mysqld --console --skip-grant-tables --skip-external-locking

und
Code: Select all
mysqlcheck -r --databases mysql --use-frm


anscheinend das Problem gelöst, sodass MySQL wieder lief.
Allerdings habe ich nun Probleme mit Rechten der Nutzerprofile in phpMyAdmin.

(Wie) kann ich verhindern, dass das immer wieder passiert? es ist jetzt ja das zweite mal innerhalb von 2 Wochen.
Last edited by diesdas on 20. July 2022 10:42, edited 1 time in total.
diesdas
 
Posts: 6
Joined: 14. July 2022 15:01
XAMPP version: 8.1.6
Operating System: Windows 11

Re: MySQL shutdown unexpectedly

Postby Altrea » 20. July 2022 10:36

Hallo,

Versuche bitte mal MariaDB folgendermaßen als Konsolenanwendung zu starten und teile uns mit, was für Rückmeldungen dort erscheinen:
  • Starte die XAMPP Shell per Klick auf den Button [Shell] im XAMPP control panel
  • Führe in der Shell folgendes Command aus
    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 shutdown unexpectedly

Postby diesdas » 20. July 2022 10:44

Tut mir leid, habe gerade meinen Post bearbeitet. Habe schon in älteren posts die Antworten gefunden. Nun ist meine Frage, warum das immer wieder passiert bzw wie ich das verhindern kann.

bei dem genannten Shell Befehl kommt jetzt:

Code: Select all
# mysqld --defaults-file=mysql\bin\my.ini --standalone --console
2022-07-20 11:46:22 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-20 11:46:22 0 [Note] mysqld (mysqld 10.4.24-MariaDB) starting as process 13208 ...
2022-07-20 11:46:22 0 [Note] mysqld: Aria engine: starting recovery
recovered pages: 0% 26% 52% 100% (0.0 seconds); tables to flush: 2 1 0
 (0.0 seconds);
2022-07-20 11:46:22 0 [Note] mysqld: Aria engine: recovery done
2022-07-20 11:46:22 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable
2022-07-20 11:46:22 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable
2022-07-20 11:46:22 0 [ERROR] Plugin 'InnoDB' init function returned error.
2022-07-20 11:46:22 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2022-07-20 11:46:22 0 [Note] Plugin 'FEEDBACK' is disabled.
2022-07-20 11:46:22 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2022-07-20 11:46:22 0 [ERROR] Aborting


Danke für die Antwort.
diesdas
 
Posts: 6
Joined: 14. July 2022 15:01
XAMPP version: 8.1.6
Operating System: Windows 11

Re: MySQL shutdown unexpectedly

Postby diesdas » 20. July 2022 15:16

Gerade festgestellt, dass ich die Meldung direkt wieder bekomme, sobald ich mysql bei XAMPP stoppe und wieder starte. Wenn ich das richtig verstehe, können die Daten nicht abgespeichert werden (ibdata1 kann nicht geschrieben werden) ... Keine Ahnung, was da falsch läuft.
diesdas
 
Posts: 6
Joined: 14. July 2022 15:01
XAMPP version: 8.1.6
Operating System: Windows 11

Re: MySQL shutdown unexpectedly

Postby Altrea » 20. July 2022 17:44

Hi,

Wenn ibdata1 nicht beschreibbar ist, liegt das in der Regel daran, dass bereits ein MariaDB Prozess darauf zugreift. Also prüfe üb du noch irgendein Konsolenfenster offen hast, ein MariaDB Prozess in deinem Taskmanager zu finden ist oder ein mysql Dienst registriert und gestartet ist.

Was die Vorbeugung des Problems betrifft ist es das einfachste den MariaDB Dienst zu registrieren. Dann kann das control panel auf die Funktionen des Windows Dienstes zurückgreifen und dadurch MariaDB sauber beenden. Dadurch sollte das Problem der korrupten Datenbank so einfach nichtmehr auftreten.
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 shutdown unexpectedly

Postby diesdas » 21. July 2022 08:07

Vielen Dank! das scheint das Problem gelöst zu haben, kann jetzt auf jeden fall mySQL starten, beenden und wieder starten ohne Probleme. Musste nur die Benutzerrechte innerhalb der DB neu verteilen.

LG und Danke für die Hilfe
diesdas
 
Posts: 6
Joined: 14. July 2022 15:01
XAMPP version: 8.1.6
Operating System: Windows 11


Return to XAMPP für Windows

Who is online

Users browsing this forum: No registered users and 116 guests