Connecting Tech Pros Worldwide Help | Site Map

reapir mysql table from php

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 17th, 2005, 08:45 AM
steve
Guest
 
Posts: n/a
Default reapir mysql table from php

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

  #2  
Old July 17th, 2005, 08:45 AM
Marcin Dobrucki
Guest
 
Posts: n/a
Default 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
  #3  
Old July 17th, 2005, 08:45 AM
Marcin Dobrucki
Guest
 
Posts: n/a
Default 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
  #4  
Old July 17th, 2005, 08:45 AM
Lucas
Guest
 
Posts: n/a
Default 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]
  #5  
Old July 17th, 2005, 08:46 AM
steve
Guest
 
Posts: n/a
Default Re: 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
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.