MySQL greška

Posle pada mail servera (bilo da je nestalo struje, ili se /var particija napunila 100%), posle pokušaja pristupa MailWatch-u može se javiti ovakva greška :
Table ‘./mailscanner/maillog’ is marked as crashed and should be repaired

Evo kako to srediti :
Isprazniti /var particiju da sistem može da radi normalno (ako je to bio problem)
Zaustaviti MailScanner servis
Logovati se kao MySQL root u mysql :
# mysql -u root -pхххххх
mysql> use mailscanner;
Database changed
mysql> check table maillog;
+———————+——-+———-+————————————————————-+
| Table | Op | Msg_type | Msg_text |
+———————+——-+———-+————————————————————-+
| mailscanner.maillog | check | warning | Table is marked as crashed |
| mailscanner.maillog | check | error | Size of datafile is: 337915904 Should be: 337915948 |
| mailscanner.maillog | check | error | Corrupt |
+———————+——-+———-+————————————————————-+
mysql> repair table maillog;
+———————+——–+———-+——————————————————–+
| Table | Op | Msg_type | Msg_text |
+———————+——–+———-+——————————————————–+
| mailscanner.maillog | repair | info | Found block that points outside data file at 337914704 |
| mailscanner.maillog | repair | status | OK |
+———————+——–+———-+——————————————————–+
mysql> quit
Bye

Ovo (ako tabela maillog nije preterano velika) ne traje više od par minuta.

Dobar link.

This entry was posted in Linux and tagged , , . Bookmark the permalink.

Comments are closed.