I have successfully been using XAMPP on my windows 10 PC to run a website that I am working on locally until today.
When I try to start MySQL, it fails. The error logs state:
mysqld.exe: Table '.\mysql\db' is marked as crashed and last (automatic?) repair failed
Fatal error: Can't open and lock privilege tables: Table '.\mysql\db' is marked as crashed and last (automatic?) repair failed
As I try to fix this, I attempted the following:
mysqlcheck --repair --use-frm --all-databases
but this gives me the following error:
Got error: 2002: Can't connect to MySQL server on 'localhost' (10061) when trying to connect
Which I guess makes sense because the mysql service isnt able to run.
I have also tried running the following from this directory: c:\xampp\mysql\data. Doing this results in an error saying 'db' doesnt exist.:
myisamchk -r db
I noticed that i have a db.MAD file that is rather large 174,616K, so not sure if that is the problem.
I ran into the same problem here is what I did: