By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,719 Members | 1,278 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,719 IT Pros & Developers. It's quick & easy.

reapir mysql table from php

P: n/a
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
Jul 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a

steve wrote:
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.


Search for 'singleton class'

/Marcin
Jul 17 '05 #2

P: n/a
steve wrote:
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.


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
Jul 17 '05 #3

P: n/a
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 <Us************@dbForumz.com> wrote in message news:<41**********@alt.athenanews.com>...
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.

Jul 17 '05 #4

P: n/a
"Marcin Dobrucki" wrote:
steve wrote:
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.


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


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
Jul 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.