[kwlug-disc] Fw: Problem on kwlug

Khalid Baheyeldin kb at 2bits.com
Wed Jul 22 15:02:21 EDT 2009


Yes, there is an fsck equivalent.

It is not hard, it depends on the table size and the extent of corruption.
In most cases it is successful, and I would use that normally, in either of
two ways:

1. from the MySQL command line:

REPAIR TABLE tablename;

2. Or you can use the mysqlcheck with the -r option. Type mysqlcheck and see
what options it shows for more details.

In this particular case, it is Drupal, and one of the cache tables is
affected.
The data in those tables are transient and completely disposable. It will be
rebuilt as needed. So, the TRUNCATE is faster. TRUNCATE in MySQL does
a quick DROP followed by CREATE TABLE, so it takes care of this particular
situation. It is faster and more guaranteed.

If you have phpMyAdmin (most web hosts do), then all this can be done from
a web interface.

More than one way to skin a cat ... the UNIX way ...

On Wed, Jul 22, 2009 at 2:50 PM, Paul Nijjar <paul_nijjar at yahoo.ca> wrote:

> On Wed, Jul 22, 2009 at 02:16:31PM -0400, Khalid Baheyeldin wrote:
> > >From MySQL's command line do this:
> >
> > TRUNCATE cache_filter;
> >
> > This is easier than repairing it, since the data in it is transient
> anyway.
>
> Thanks, Khalid. Thanks to you I think we are back to normal now.
>
> How terrible is it to actually repair a database? Is there an
> fsck-like command that can be run, or does it require knowledge of the
> application and tedious row-matching?
>
> - Paul
>
>
>
>
> _______________________________________________
> kwlug-disc_kwlug.org mailing list
> kwlug-disc_kwlug.org at kwlug.org
> http://astoria.ccjclearline.com/mailman/listinfo/kwlug-disc_kwlug.org
>



-- 
Khalid M. Baheyeldin
2bits.com, Inc.
http://2bits.com
Drupal optimization, development, customization and consulting.
Simplicity is prerequisite for reliability. --  Edsger W.Dijkstra
Simplicity is the ultimate sophistication. --   Leonardo da Vinci
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20090722/4be1ed98/attachment.htm>


More information about the kwlug-disc mailing list