Page 1 of 1

XAMPP keeps failing due to corrupted database 'db'

PostPosted: 07. June 2021 00:37
by dhargreaves
I have been a happy user of the XAMPP package for many years, but have had a repeatedly sad experience after a period of time which is that I go to start my LOCALHOST environment and the phpmyadmin tool and discover that I can't access user accounts and get a message that the 'db' database is corrupt.

Any assistance would be greatly appreciated...thanks to you all!

-David

Re: XAMPP keeps failing due to corrupted database 'db'

PostPosted: 11. July 2022 12:06
by ies
I have the same problem too. I use XAMPP for many years without any problem. Recently I installed XAMPP 3.3.0 in my new laptop with Windows 11 and every second or third time I start MySQL the database is corrupted. I have to to the trick described in the following link as a temporary solution.
https://stackoverflow.com/questions/56865620/mysql-stops-unexpectedly

Re: XAMPP keeps failing due to corrupted database 'db'

PostPosted: 12. July 2022 08:55
by Altrea
Register the MariaDB windows services. Then the xampp control panel uses the services to start and stop MariaDB. That is the only valid method known to prevent MariaDB from corrupting.

Re: XAMPP keeps failing due to corrupted database 'db'

PostPosted: 12. July 2022 09:57
by ies
Ok, I applied your idea and I will wait for some days to see if the problem will appear again or not. Thank you for the quick answer.

Re: XAMPP keeps failing due to corrupted database 'db'

PostPosted: 12. July 2022 14:47
by Froosh
What Altrea recommends has worked for me for months now. Before that I was getting database corruption regularly. Once I started running MariaDB as a Windows Service, my environment has been solid.

Re: XAMPP keeps failing due to corrupted database 'db'

PostPosted: 15. July 2022 10:46
by ies
After a few days having applied the suggestion of Altrea it seems that the problem is solved. So thanks for the solution of Altrea (and the confirmation of Froosh), I can work better now.

Re: XAMPP keeps failing due to corrupted database 'db'

PostPosted: 06. September 2022 14:31
by smuffatti
Hey, I also have this issue where I have to preform the trick listed by ies every few days. I'm a little confused on how to register the MariaDB windows services on Windows 11 as Altrea suggests. Any guidance would be appreciated.

Re: XAMPP keeps failing due to corrupted database 'db'

PostPosted: 06. September 2022 18:09
by Altrea
smuffatti wrote:I'm a little confused on how to register the MariaDB windows services on Windows 11 as Altrea suggests.

open your xampp control panel with elevated Administrator rights (rightclick -> run as Administrator)
then click on the red X button next to mysql

Re: XAMPP keeps failing due to corrupted database 'db'

PostPosted: 08. September 2022 16:55
by smuffatti
So amazing and simple. I can't believe I missed that. Thank you very much.