-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.

3
  • Can you check, if your disk is full? If yes, then try to free up spaces and start again.
    – Diamond
    Commented Nov 22, 2015 at 10:18
  • my disk 14GB free Commented Nov 22, 2015 at 10:24
  • Then you need to try repair the corrupt table. See here
    – Diamond
    Commented Nov 22, 2015 at 10:53

1 Answer 1

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

1
  • 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. Commented Nov 22, 2015 at 19:43

Not the answer you're looking for? Browse other questions tagged .