Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

How to use myisamchk?

Quote Reply
How to use myisamchk?
I ran out of disk space, when I cleared some the forum still wasn't working, so now I need to run myisamchk to repair the tables. Does anyone know how to do this exactly? What are the commands for running it on one of the mysql databases?

Jason
Quote Reply
Re: [wickedmoon] How to use myisamchk? In reply to
Hi Jason,

I replied via email, but for anyone else facing this, you can either:

1. Login via ssh/telnet and cd to your mysql data directory and type:

myisamchk -r *.MYI

this typically involves being root.

2. From the SQL Monitor, type `REPAIR TABLE tablename` for each table in your database (you can get a list of tables via `SHOW TABLES`. This only works on newer mysql's.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] How to use myisamchk? In reply to
Hello Alex!

I did not have any problem at all in the database, but still used to repair once the table with phpMyadmin version 2.3.0 (this version is excellent!). The method you shown may is already in there but by web interface.

The advantage is also that one does not typically be logged in as root (shared server). One can also convert the old table into the new MYISMCHK format.

However, I thought to also add that in the new version of phpMyadmin, there is not only repair function that the script would do but also optimize and analysis.

Last edited by:

rajani: Sep 14, 2002, 10:45 PM
Quote Reply
Re: [rajani] How to use myisamchk? In reply to
Hi,

Yes, you can do:

REPAIR TABLE tablename

from SQL Monitor, as well as:

OPTIMIZE TABLE tablename

This is only available on MySQL 3.23 or greater though, so you may still have to use myisamchk.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] How to use myisamchk? In reply to
Hello Alex!

I did`nt know that. Thanks for your information.