reapir mysql table from php

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • steve

    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
  • Marcin Dobrucki

    #2
    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

    Comment

    • Marcin Dobrucki

      #3
      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

      Comment

      • Lucas

        #4
        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.athenan ews.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]

        Comment

        • steve

          #5
          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

          Comment

          Working...