Error: MySQL shutdown unexpectedly.

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

Error: MySQL shutdown unexpectedly.

Postby ajax » 08. May 2021 15:42

I think I had the same problem. The suggestions offered herein seems to have fixed the problem that prevented the MySQL (Maria DB) server from starting. However, when using phpMyAdmin my databases seem to be present but it looks like the users that were setup for accessing the databases might be missing. I say might because when I attempt to display User Accounts in phpMyAdmin an error results as follows:

#1034 - Index for table 'db' is corrupt; try to repair it

db is one of the tables in the mysql database that was restored from the backup. Based on my interpretation of the recovery steps it is NOT too surprising to find my users missing but when User Accounts tab cannot be used it appears that there is NO way to recreate them using phpMyAdmin.

Is it possible that this problem can be resolved without starting over on XAMPP migration?
ajax
 
Posts: 35
Joined: 14. December 2010 17:57
Operating System: Windows 2000 Professional

Re: Error: MySQL shutdown unexpectedly.

Postby Altrea » 08. May 2021 18:49

Hi,

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


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 119 guests