-1

I need some help here (excuse me for my bad English).

mysql stopped suddenly after running for several hour. Since then I'm unable to start it. I have also restarted my computer. I get the following error message

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

What should I do? Any advice?

I'm using xampp 5.6.14.

Thanks.

Diamond
  • 9,001
  • 3
  • 24
  • 38

1 Answers1

1

Stop the mysql service. navigate to the data library and repair the table

mysql myisamchk -r -v -f mysql/<DB_NAME>/<TABLE_NAME>

Don't forget to make a backup before trying to repair.

You can find more relative informations in the official documentation : http://dev.mysql.com/doc/refman/5.0/en/mysqlcheck.html

Froggiz
  • 3,043
  • 1
  • 19
  • 30
Linuxer
  • 71
  • 3
  • It is strange that this table has crashed during normal workload, as it's only written on permission change which is a manual process. Before proceeding with *myisamchk* check your disk for errors. – sam_pan_mariusz Nov 22 '15 at 19:43