Showing posts with label corrupt. Show all posts
Showing posts with label corrupt. Show all posts

Wednesday, February 23, 2011

Incorrect Information in .FRM File of InnoDB Table

MySQL organizes all the data as tables, irrespective of storage engine used. If you are using MySQL with InnoDB tables, these tables might get corrupt due to hardware faults, unexpected power failure, MySQL code errors, kernel bugs and other similar reasons. In such cases, InnoDB will typically give some errors indicating table corruption. As a data restoration source, you will need to use your latest database backup. But in case if backup fails to restore required information or doesn’t exist, you should scan your damaged database using third-party MySQL Repair or MySQL Recovery tools.

You might encounter the similar error message while accessing an InnoDB table:

“#1033 - Incorrect information in file: '"table name" .frm”

MySQL crashes after you receive this error message.

Cause: You receive this error message if InnoDB table is corrupted or damaged. An InnoDB table is stored as three files: .FRM (database table definition), .MYI (Index file) and .MYD (table data). This particular error occurs if .FRM table is damaged or corrupted.

Solution:
To solve such problems, you should follow these steps:
    Check the table for corruption errors. To do so, you need to use CHECK TABLE command with options like QUICK, EXTENDED, CHANGED etc. that can be used on the basis of check required. The basic syntax is: "CHECK TABLE tablename [options]" If table corruption is the issue, repair it using REPAIR TABLE command. Before using the command, you should make sure that your disk contains about twice as much disk space as of damaged table. REPAIR TABLE command can be used with options like QUICK and EXTENDED with the following syntax: "REPAIR TABLE tablename [options]" If above measures cannot repair the damaged table, check your backup status. If valid backup is available, delete the damaged table and restore from backup. If no valid backup is present, you can make use of MySQL Recovery software. These are advanced tools to analyze and repair damaged MySQL tables. Using powerful scanning, these tools are also capable of maintaining database integrity. Moreover, these MySQL Repair applications come available with rich user interface.

Stellar Phoenix Database Recovery For MySQL is an optimum tool to repair and restore damaged MySQL tables. It supports recovery for both InnoDB (.ibdata, .ibd and .frm) and MyISAM (.myd, .myi and .frm) database storage engines. The software supports MySQL 5.x. This non-destructive MySQL Recovery tool can restore all database objects, like tables, primary key(s), relations and others. It can recover databases of Windows and Linux platforms and is compatible with Windows Vista, XP, 2003, and 2000.

Article is taken from: http://hubpages.com/hub/Incorrect-Information-in-FRM-File-of-InnoDB-Table

Thursday, December 9, 2010

Recovering MySQL Corruption in Bugzilla Database

Bugzilla is a web-based bug tracking and testing application that is used by many software development companies. It extensively various databases including MySQL for its backend support especially because both of these applications are freely available. Although this tool runs pretty fine in most cases, it can get stalled when the some of the MySQL tables get corrupt. In such cases, you are unable to perform various tasks on the database. You can use the 'myisamchk' command with different parameters to repair MySQL database. If it does not work, then you should use a professional MySQL recovery software to recover MySQL database.

Discussing a similar situation in Bugzilla, consider you get the following error message while generating a bugs report:

"undef error - DBD::mysql::db selectrow_array failed: Table 'attach_data' is
marked as crashed and should be repaired [for Statement "SELECT LENGTH(thedata)
FROM attach_data WHERE id =?"] at Bugzilla/Attachment.pm line 344
Bugzilla::Attachment::datasize('Bugzilla::Attachment=HASH(0x9df119c)') called"

Cause:

As can be inferred from the message itself, the 'attach_data' table is corrupt, which is why you are getting this error message in Bugzilla.

Resolution:

To resolve this error message and repair MySQL database, you should perform the following steps:

You should find out all the corrupt tables in the MyISAM database using the following command:

# myisamchk /var/lib/mysql/bugs/*.MYI >> /tmp/myisamchk_log.txt
The /tmp/myisamchk_log.txt file will contain the list of all the checked tables as displayed:
Checking MyISAM file: user_group_map.MYI

Data records: 182 Deleted blocks: 0
- check file-size
- check record delete-chain
- check key delete-chain
- check index reference
- check data record references index: 1

Repair the table using the following command:

# myisamchk -r profiles.MYI
You should do a check and repair using the myisamchk command as displayed:

# myisamchk --silent --force --fast --update-state /var/lib/mysql/bugs/*.MYI

The 'myisamchk' tool is competent enough to check and repair the MyISAM table. But some instances have been noticed where the table is not repaired using this tool. On such occasions, the most worthwhile option is to use a third-party software to perform MySQL repair. These MySQL recovery tools guarantee MySQL repair without any damage to the original tables.

One such software is Stellar Phoenix Database Recovery for MySQL, which repairs MySQL files from all instances of logical corruption. Can be used on various Windows platforms including Windows 7, Vista, Server 2003, XP, and 2000, this MySQL recovery utility recovers MySQL tables created in MySQL 3.x, 4.x, 5.x, and 6.x versions.

Source: http://goarticles.com/article/Recovering-MySQL-Corruption-in-Bugzilla-Database/3759302

Wednesday, October 27, 2010

Rectifying Corruption Issues in MyISAM Table in MySQL 5.0.22 Database

MySQL is the most popular open-source database in the world. It has the distinction of being the only database that is used in every continent. Yes, even Antartica!!! The reasons for such popularity is its availability, performance, robustness, etc. It provides three types of database engines, MyISAM, InnoDB, and MySQL Archive. Out of these, the MyISAM table is the default table type. It is fast, simple, and allows full-text searching. Although it is reliable, it can become corrupt and, thus, inaccessible following a system crash. You should use appropriate corrective measures to repair MySQL database. However, if you are not able to do so then you should use a third-party MySQL recovery software to do so.

Consider a scenario wherein you have MySQL 5.0.22 database running in your system. You use it for MediaWiki installation that is reported as corrupt. When you try to repair the table, the following error message is displayed:

"Key in wrong position at page 4096"

You, then, quit the database and stopped the mysql process in the Task Manager and executed the myisamchk - r and myisamchk - o commands. But you were unable to resolve the issue.

Cause
The root cause of this error message is that the MySQL database is corrupt.

Resolution

To resolve this erroneous situation, you should firstly create the backup of the corrupted database. Then, you should use the following methods to repair the MySQL database:

You should use the following REPAIR TABLE query to repair the corrupted MySQL repair table tablename use_frm;

If the REPAIR TABLE query does not repair the database, then you should check for the backup. If the backup is updated and clean, then you should restore the database from its backup.

The aforementioned methods should be able to resolve the issue. However, if the problem is still there then you should use a third-party mysql repair software to restore the corrupted database. Such read-only tools are able to repair MySQL database using fast yet sophisticated scanning algorithms.

Database Recovery for MySQL is a MySQL recovery software that enables you to repair MySQL database. It is able to recover MySQL database for the MyISAM and InnoDB MySQL database storage engines. This mysql database repair tool is designed for MySQL 4.x and 5.x versions. It supports MySQL recovery for MyISAM (.myd,.myi,.frm) and InnoDB (.ibdata,.ibd,.frm) files. It is compatible with Windows 7, Vista, Server 2003, XP and Server 2000.

Advika Singh work as a freelancer and researcher repair mysql & recover mysql software.

Article Source: http://EzineArticles.com/?expert=Advika_Singh