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

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 :)

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <b> <pre> <h1> <h2> <h3> <h4> <h5> <h6> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <div> <style><img> <br> <blockquote>
  • Lines and paragraphs break automatically.
  • You may insert videos with [video:URL]

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.

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.