Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

1.2K
Visualizações
Unable to start mysql via XAMPP - mysql\db crashed

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.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

I ran into the same problem here is what I did:

  1. Find and open the 'my.ini' file with Notepad. (Mine is at c:\xampp\mysql\bin\my.ini )
  2. Insert 'skip-grant-tables' in the 'my.ini' file on a new line following the label '[mysqld]' and save. You will remove this after the problem is fixed.
  3. Now mySQL you can start XAMPP from the control panel.
  4. Start phpMyAdmin from your browser and select the table 'db' from the database 'mysql' (Select 'mysql' from left panel then check 'db' in right hand panel).
  5. Beneath from the 'With selected' dropdown, run 'analyze' (it should say that it is corrupted). Then select again and run 'repair table'.
  6. Find the 'my.ini' file again and open with Notepad.
  7. Remove 'skip-grant-tables' in the 'my.ini' file and save.
  8. Problem should be fixed and you should be able to start XAMPP normally which will start MySQL normally.
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda