Jump to content

Seeking help with "myisamchk -r"

Recommended Posts

I just used myisamchk -r --force --fast /var/lib/mysql/ipb/posts.* as an attempt to fix a crash table.
It was running really fast, but now it's stuck at "index 8" and has not moved for an hour.

Is this normal?

Data records: 2400361

- Fixing index 1

- Fixing index 2

- Fixing index 3

- Fixing index 4

- Fixing index 5

- Fixing index 6

- Fixing index 7

- Fixing index 8


Link to comment
Share on other sites

You should check and see if your /tmp directory is getting full (the partition it's on) as that's where the files are normally stored as they are rebuilt. Sometimes they can be stored inside your database directory though (in your case, /var/lib/mysql/ipb/).

I would normally issue this command:

mysaimchk --force --fast --update-state /var/lib/mysql/ipb/*.MYI

Depending on the speed of your server, and size of your forum, yes it can be normal to be stuck at an index rebuild for some time.

The .TMD file is the temporary/intermediate file that's generated while myisamchk is repairing your tables. Also, make sure the MySQL server is completely offline while you issue these commands.

If you're still having issues with this, then launch the MySQL server and run this:

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

This will repair and optimise all databases and all tables within them, and is another method to try and repair the table. Be warned that little progress will be shown while this happens and it may take quite some time. If you're familar with it, I would suggest using screen on Linux in case you get disconnected during.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...