LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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


Closed Thread
  Search this Thread
Old 12-08-2003, 10:50 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
MySQL Corrupt Database


I have a server running mysql-standard-4.0.14 this server runs about 40 databases, I have one of them that about once a week it will get a corrupted table, You can run a repair and it will find all but one record every time and it is a different table every time. About a month ago I did a backup of the database and then deleted the database and created it again from the backup, it worked fine for about a month and now it is back to getting corrupt tables.

The MySQL that I am using is the binarys straight from MySQL I did not compile them, also I have never had a corrupt table on any of the other databases just this one. Does anyone know what could be causing this problem? I have part of the .err mysql log below.

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 './baddb/Users'
031016  9:34:20  read_key: Got error 127 when reading table './baddb/Users'
031016  9:35:04  read_key: Got error 127 when reading table './baddb/Users'
031016  9:35:04  read_key: Got error 127 when reading table './baddb/Users'
031016  9:40:23  read_key: Got error 127 when reading table './baddb/Users'
031016  9:41:03  read_key: Got error 127 when reading table './baddb/Users'
031016  9:41:07  read_key: Got error 127 when reading table './baddb/Users'
031016  9:41:19  read_key: Got error 127 when reading table './baddb/Users'
031016  9:41:28  read_const: Got error 127 when reading table ./baddb/Users
031016  9:41:36  read_const: Got error 127 when reading table ./baddb/Users
031016  9:43:40  Note: Found 124 of 125 rows when repairing './baddb/Users'
031020 14:45:19  Note: Found 2324 of 2325 rows when repairing './baddb/Bodies_r'
031021 17:43:01  Note: Found 244 of 245 rows when repairing './baddb/Bodies_m'
031130  7:46:49  Note: Found 2192 of 2193 rows when repairing './baddb/Bodies_k'
031205 17:34:27  Note: Found 1088 of 1089 rows when repairing './baddb/Bodies_m'
 
Old 04-10-2010, 06:59 AM   #2
nancy86
LQ Newbie
 
Registered: Apr 2010
Posts: 2

Rep: Reputation: 0
There are many reasons which will result into corruption of MySQL database. Since you haven't specified the reason properly, so why don't you try the below mentioned things to work it out -
Run the following inbuilt commands -
  • Check the corruption limit of the table using underneath statement: mysqlcheck [options] dbname tablename [tablename2... ]
  • Repair the corrupt table using below statement: repair table tablename [,tablename1...][options]

In case, the above steps fail to resolve the corruption, then it means that the table is beyond the capabilities of Repair command. In such scenarios, the only way to repair the table is by using advanced MySQL Database Repair software.

I hope these steps will help you out to resolve the issue.

All the best!
 
Old 04-10-2010, 02:18 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 740Reputation: 740Reputation: 740Reputation: 740Reputation: 740Reputation: 740Reputation: 740
That SW appears to be for Windows. Am I wrong that the OP is using Linux?
 
Old 04-10-2010, 02:19 PM   #4
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Code:
/usr/local/mysql/bin/mysqld: ready for connections.
would seem to suggest a Linux server.
 
  


Closed Thread


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Corrupt RPM database caribwave Red Hat 1 07-05-2005 03:16 PM
Writing an app that uses a mysql database without installing mysql server? QtCoder Programming 4 08-09-2004 03:43 PM
MYSQL help - mysql database missing eloviyandhi Linux - Software 1 03-20-2004 10:20 PM
Corrupt RPM database, maybe? eurleif Linux - Software 3 01-02-2004 03:55 AM
Mysql database from cd JHuizingh Linux - Software 0 02-22-2003 03:08 PM

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

All times are GMT -5. The time now is 08:11 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration