Tuesday, July 18, 2017

MYSQL: "is marked as crashed"

Message found:
"mysqldump: Got error: 145: Table is marked as crashed and should be repaired when using LOCK TABLES"
And if Table Repair tool doesn't works, try this:


1.-Stop MYSQL service:

[root@webapp html]# service mysql stop

2.-Change to DB folder:


[root@webapp html]# cd /var/lib/mysql/mesadeayuda

3.-Send command:

[root@webapp html]#  myisamchk -r -v -f glpi_logs --sort_buffer_size=2G
- glpi_logs is a table's name (change this)
- Sort buffer is very important.

Partial result:


4.-Start MYSQL service:

[root@webapp html]# service mysql start

No comments:

Post a Comment