LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-22-2003, 04:42 AM   #1
cli_man
Member
 
Registered: Apr 2002
Location: New York, USA
Distribution: Redhat 7.2, 9.0 Slackware 9.1
Posts: 428

Rep: Reputation: 30
Corrupted MySQL Tables


I have a Redhat 7.2 machine running MySQL 4.0.14 Just in the last week we have had problems with it getting corrupt tables, it seems to be getting about 1 corrupt table per 2 days, not the same time or anything.

This machine hosts about 60 other databases that have not had a single problem yet, this one is probably the most used but others on the system come pretty close on use.

Would anyone have an idea as to what might be causing this?

Here is an excerp from the mysql .err log

Code:
031015 12:50:11  mysqld started
031015 12:50:16  InnoDB: Started
/usr/local/mysql/bin/mysqld: ready for connections.
Version: '4.0.14-standard'  socket: '/tmp/mysql.sock'  port: 3306
031016  9:34:20  read_key: Got error 127 when reading table './database/Users'
031016  9:34:20  read_key: Got error 127 when reading table './database/Users'
031016  9:35:04  read_key: Got error 127 when reading table './database/Users'
031016  9:35:04  read_key: Got error 127 when reading table './database/Users'
031016  9:40:23  read_key: Got error 127 when reading table './database/Users'
031016  9:41:03  read_key: Got error 127 when reading table './database/Users'
031016  9:41:07  read_key: Got error 127 when reading table './database/Users'
031016  9:41:19  read_key: Got error 127 when reading table './database/Users'
031016  9:41:28  read_const: Got error 127 when reading table ./database/Users
031016  9:41:36  read_const: Got error 127 when reading table ./database/Users
031016  9:43:40  Note: Found 124 of 125 rows when repairing './database/Users'
031020 14:45:19  Note: Found 2324 of 2325 rows when repairing './database/Bodies_r'
031021 17:43:01  Note: Found 244 of 245 rows when repairing './database/Bodies_m'
root@server:/usr/local/mysql/data$
This database also has several scripts that run almost continusly selecting and inserting data into them via the web and also a perl script.
 
Old 10-22-2003, 06:28 AM   #2
verbal
Member
 
Registered: Jul 2002
Location: New York
Distribution: Red Hat 7.2, SuSE 7.3
Posts: 60

Rep: Reputation: 15
Re: Corrupted MySQL Tables

Quote:
Originally posted by cli_man
I have a Redhat 7.2 machine running MySQL 4.0.14 Just in the last week we have had problems with it getting corrupt tables, it seems to be getting about 1 corrupt table per 2 days, not the same time or anything.
This is an "informed" guess...but a guess all the same: do you still have gcc 2.96 installed, and did you compile the installations yourself, or worse, did you use a pre-compiled *.rpm for installation from that era?

The 2.96 compiler was a broken one, it was actually based on a developer's snap shot of the upcoming 3.0 release at the time, (RH kind of PO'd gcc at the time rather effectivly over this).

Point here is that MySQL reported that spontaneously corrupted tables were a symptom experienced by databases which were compiled with this compiler. The quote on their site at the time was that they didn't know why it happened, but that they could repeat the problem only by compiling with 2.96. Their suggestion was not to use it. This is one reason I never use *.rpm's, you never know what someone used to compile the code with.

heres some notes on the topic:

this quote from MySQL:

Quote:
Compiler Advisory: Several users have reported random crashes and table corruptions when using MySQL binaries compiled with gcc 2.96 on the x86 Linux platform. We suggest that you use gcc 2.95 or gcc 2.91 to compile your own binaries. It should also be safe to use gcc 3.2.
can be found here:
http://www.mysql.com/downloads/mysql-3.23.html

GNU's response to RH's stupidity
http://gcc.gnu.org/gcc-2.96.html


Verbal
 
Old 10-22-2003, 06:37 AM   #3
cli_man
Member
 
Registered: Apr 2002
Location: New York, USA
Distribution: Redhat 7.2, 9.0 Slackware 9.1
Posts: 428

Original Poster
Rep: Reputation: 30
No I used the precompiled binarys from mysql.com and I didn't use rpm's, I just grabbed their latest stable version at the time and installed it. Also it has been running for a couple months with no problem.
 
Old 10-22-2003, 06:44 AM   #4
verbal
Member
 
Registered: Jul 2002
Location: New York
Distribution: Red Hat 7.2, SuSE 7.3
Posts: 60

Rep: Reputation: 15
Quote:
Originally posted by cli_man
Also it has been running for a couple months with no problem.
This wouldn't matter.... the issue was described as "spontaneous"... it occured after a long period of normal use. The fact that you had gotten a couple months use was what made me think of the issue, you had described it perfectly.

BUT... if you got the binaries from them it is probably not the issue, sorry I wasn't of more help

good luck

Verbal
 
Old 10-22-2003, 06:49 AM   #5
cli_man
Member
 
Registered: Apr 2002
Location: New York, USA
Distribution: Redhat 7.2, 9.0 Slackware 9.1
Posts: 428

Original Poster
Rep: Reputation: 30
Well thank you for trying.

Any other suggestions from anyone?

Also another one to through into the mix, I wonder if maybe a bad perl or php script might have something to do with it, is it possible to have a script corrupt a mysql table? Or is that pretty much impossible as MySQL would just give the script back an error and keep chugging along?
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
mysql reinstallation distorted by previous tables in /var/mysql mad4linux Linux - Software 0 10-04-2005 01:39 PM
Fedora 3/winXP corrupted partition tables frankinmerth Linux - Newbie 4 04-13-2005 04:06 PM
MySQL tables from 4.0 to 3.0 michaelbhahn Linux - Software 0 08-31-2004 10:23 AM
mysql tables with a - pk21 Linux - Software 7 05-23-2003 06:27 AM
mysql tables noord28 Linux - Newbie 0 02-20-2003 02:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration