Connecting Tech Pros Worldwide Forums | Help | Site Map

reapir mysql table from php

steve
Guest
 
Posts: n/a
#1: Jul 17 '05
I have an on-going problem that my ".MYI" mysql files get corrupted.
I have written php trapping routine to report on the problem to
admin. My next step is to initiate "repair table" right after the
error is trapped.

The problem is that then I would have multiple repair table commands
initiated from different browser sessions. How can I make sure that
only one "repair table" is running at a time.

--
http://www.dbForumz.com/ This article was posted by author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbForumz.com/PHP-reapir-m...ict151640.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=507693

Marcin Dobrucki
Guest
 
Posts: n/a
#2: Jul 17 '05

re: reapir mysql table from php



steve wrote:[color=blue]
> I have an on-going problem that my ".MYI" mysql files get corrupted.
> I have written php trapping routine to report on the problem to
> admin. My next step is to initiate "repair table" right after the
> error is trapped.
>
> The problem is that then I would have multiple repair table commands
> initiated from different browser sessions. How can I make sure that
> only one "repair table" is running at a time.[/color]

Search for 'singleton class'

/Marcin
Marcin Dobrucki
Guest
 
Posts: n/a
#3: Jul 17 '05

re: reapir mysql table from php


steve wrote:[color=blue]
> I have an on-going problem that my ".MYI" mysql files get corrupted.
> I have written php trapping routine to report on the problem to
> admin. My next step is to initiate "repair table" right after the
> error is trapped.[/color]

Out of curiosity... how are you db files getting corrupted? Is the
server constantly shut off without a shutdown procedure? Perhaps
enabling logging on the filesystem and making sure the computer doesn't
creash is the way to go?

/m
Lucas
Guest
 
Posts: n/a
#4: Jul 17 '05

re: reapir mysql table from php


Hi Steve,

you're coming home from the backyard. Try the front door. Why would
you want users(browser sessions) iniatiate the repair sequence? This
is usually done by a cron job. If this repair procedure should be
event driven you may want to put a database in between the cron job
and the client application. The application would check the integrity,
if a repair procedure is needed, the flag in database would be set.
Afterwards the only task for the cron-job would be checking the repair
flag and carrying out necessary operations, if required.

Best Regards,

Lucas


steve <UseLinkToEmail@dbForumz.com> wrote in message news:<414f45f2$1_2@alt.athenanews.com>...[color=blue]
> I have an on-going problem that my ".MYI" mysql files get corrupted.
> I have written php trapping routine to report on the problem to
> admin. My next step is to initiate "repair table" right after the
> error is trapped.
>
> The problem is that then I would have multiple repair table commands
> initiated from different browser sessions. How can I make sure that
> only one "repair table" is running at a time.[/color]
steve
Guest
 
Posts: n/a
#5: Jul 17 '05

re: reapir mysql table from php


"Marcin Dobrucki" wrote:[color=blue]
> steve wrote:[color=green]
> > I have an on-going problem that my ".MYI" mysql files get[/color]
> corrupted.[color=green]
> > I have written php trapping routine to report on the[/color]
> problem to[color=green]
> > admin. My next step is to initiate "repair table" right[/color]
> after the[color=green]
> > error is trapped.[/color]
>
> Out of curiosity... how are you db files getting corrupted?
> Is the
> server constantly shut off without a shutdown procedure?
> Perhaps
> enabling logging on the filesystem and making sure the
> computer doesn't
> creash is the way to go?
>
> /m[/color]

I have a server with heavy load. Once every few days, I get this
corruption. I have posted on this ng with no results...

The server is constantly up, so it is not related to that.

--
http://www.dbForumz.com/ This article was posted by author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbForumz.com/PHP-reapir-m...ict151640.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=508966
Closed Thread