Skip to main content
CafeWebmaster

Main navigation

  • Tools
    • MD5 converter
    • SHA1 converter
    • Base64 encode
    • Base64 decode
    • HTML entities encode
    • HTML entities decode
    • Raw url encode
    • Raw url decode
    • UTF8 encode
    • UTF8 decode
    • Unix Time to Human Date converter
    • Remove duplicate lines
    • Sort text lines
    • Backwards - Mirrored Text
    • PiRaTe tExT
    • Your IP Address & Hostname
  • Forums
  • Free PHP Scripts
    • Image watermark with PHP
    • Page generation time with PHP
  • CSS
    • CSS hidden left menu
    • CSS horizontal menu
  • Free Fonts
  • Image Editors
  • Tutorials
    • Check password strength / safety with PHP and Regex
    • Cómo hacer que su sitio web popular!
    • How2 make a website popular
    • How2 secure your website
    • Kennwort Sicherheit mit PHP und Regex Prüfen
    • Page generation time and http-referrers with php
    • Redirect webpages with HTML, PHP, .htaccess, Java+Script, CGI-Perl, ASP.NET and ColdFusion
  • New
User account menu
  • Log in

Breadcrumb

  1. Home

[Howto Fix] Table './eximstats/sends' is marked as crashed and should be repaired

By rex, 30 April, 2010

I've tryed to dump my whole databases with mysqldump


mysqldump --all-databases > all_databases.sql

got the error 'Table './eximstats/sends' is marked as crashed and should be repaired when using LOCK TABLES'

'eximstats' is my databasename und 'sends' my tablename.

I've tryed to repair the table with


mysqlcheck -u root --check auto-repair --optimize all-databases

but it no not worked

I've also tryed to repair ith with


mysql> repair table eximstats.sends;
+-----------------+--------+----------+-----------------------------------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+-----------------+--------+----------+-----------------------------------------------------------------------+
| eximstats.sends | repair | Error | Table './eximstats/sends' is marked as crashed and should be repaired |
| eximstats.sends | repair | Error | Table 'sends' is marked as crashed and should be repaired |
| eximstats.sends | repair | status | Table is already up to date |
+-----------------+--------+----------+-----------------------------------------------------------------------+

and it do not worked again...

I've stoped mysql daemon

service mysqld stop

I've tryed to repair MYI files with myisamchk with the parameter '-r'.


root@server[/home/user]# myisamchk /var/lib/mysql/eximstats/sends.MYI
Checking MyISAM file: /var/lib/mysql/eximstats/sends.MYI
Data records: 904 Deleted blocks: 114296
myisamchk: warning: Table is marked as crashed
myisamchk: warning: 19 clients are using or haven't closed the table properly
- check file-size
- check record delete-chain
myisamchk: error: record delete-link-chain corrupted
- check key delete-chain
- check index reference
- check data record references index: 1
myisamchk: error: Found key at page 3105792 that points to record outside datafile
MyISAM-table '/var/lib/mysql/eximstats/sends.MYI' is corrupted
Fix it using switch "-r" or "-o"


root@server[/home/user]# myisamchk /var/lib/mysql/eximstats/sends.MYI -r
- recovering (with sort) MyISAM-table '/var/lib/mysql/eximstats/sends.MYI'
Data records: 904
- Fixing index 1
- Fixing index 2
- Fixing index 3

And it worked suddenly :)

  • Log in to post comments
CafeWebmaster.com(CW) is a free online community for webdevelopers and beginners. Anybody can share their code, articles, tips, tutorials, code-examples or other webdesign related material on the site. Newbies can submit their questions and reply to existing questions. CW does not guarantee or warrant reliability of code, data and information published on the site. Use the site on your own risk. The site takes no responsibility of direct or indirect loss or any kind of harm to its users. The site also doesn't take responsibility of infected files or source code with any kind of infection or viruses, worms, spywares, malwares, trojan horses. CW reserves the right to edit, move, or delete any of content for any reason.