Friday, September 9, 2011

Incorrect Information in .FRM file of MyISAM storage engine

MySQL database uses tables to store data and all these tables are defined by .FRM file. FRM is an internal file in MySQL database that contains the formating information or structure data for the database. It defines fields and structure of each MySQL's table. Regardless of the storage engine that you choose, every MySQL table is represented by .frm file. File bears the same name as table name with extension .FRM.

Example: suppose you have create a employee table in mysql database then frm file name will be employee.frm that will define the employee table.

Corruption in MySQL database table will resist you to access the table that can be happen due to several reasons like kernel bugs, unexpected power failure, hardware failure, virus attack, and many more. A corrupted table will placed the incorrect information in the frm file and you may got below error message:

Incorrect information in file: './able-name.frm'”

Resolution: you have three solutions to repair MySQL table after getting above error message:
  1. Repair corrupt table by REPAIR TABLE statement
  2. Restore from Backup
  3. Stop and copy method
Stop and copy method details
Note: if you are using MyISAM storage engine then follow the below steps to repair corrupt table:
  • Stop MySQL database
  • Take backup of your .frm, .myd, myi files.
  • Delete these files from mysql data directory.
  • Now start MySQL Database
  • Rereate table again by CREATE Table statement.
  • Stop MySQL database.
  • Copy .myd & .myi files back into the data directory, replace the ones there.
  • Start MySQL database again.
If all three methods fail to fix the corruption from table then at last you should try Stellar Phoenix MySQL repair software. MySQL repair software repairs corrupted table created using MyISAM as well as Innodb. This software has around 99 percent success rate. Its very safe and offers easy-to-use interface.

Wednesday, September 7, 2011

REPAIR TABLE statement to Repair corrupt MySQL Table

MySQL database offers seven syntaxes for proper maintaining of mysql table's records. Those syntaxes are as follows:
  1. Repair table syntax 
  2. Analyze table syntax
  3. Backup table syntax
  4. Check  table syntax
  5. Checksum  table syntax
  6. Optimize  table syntax
  7. Restore  table syntax
In this article, we will discuss briefly about first syntax that is Repair Table syntax.

REPAIR Table Syntax: It repairs corrupted mysql database tables. A table gets corrupt due to several reasons like virus attack, system failure, power failure, hardware problem, power failure and so on. Corrupt mysql database tables can be repair by this syntax.

Systax for Repair Table:
“REPAIR [NO_WRITE_TO_BINLOG | LOCAL] TABLE
    tbl_name [, tbl_name] ...
    [QUICK] [EXTENDED] [USE_FRM]”

Above syntax has three options like quick, extended, and use_frm.
When you select “quick” option then repair table syntax will try to repair index file only. This kind of repair is done by myisamchk.

When you select “extended” option then mysql database creates row by row index in place of one row at a time.  This kind of repair is done by myisamchk.

Use_frm option is available only when header file is corrupted or index file missing.  This kind of repair is not done by myisamchk.

Caution: It is the best method to take a backup of corrupt mysql database table before trying “Repair Table” syntax on it.

Sometimes above repair syntax also fails to fix corruption in mysql database at this situation most of the database administrators suggest to try any third party mysql database repair software. It totally depends upon you to choose the best mysql repair tool that meets your requirement and budget.

Tuesday, August 23, 2011

How to Repair MySQL Table using phpMyAdmin?


MySQL is a relational database and uses table to store the data. Table has column and row to store records. An Individual column must be created to store each type of data like employee name, employee code, employee address, age, sex, and many more. On the other side row contains the actual value that specified with the column of table.

Example: Lets consider an example, we have created an employee details table. Employee details table has five columns employee name, employee code, employee address, employee age, and employee sex. We can insert values into the employee details table through the insert query.

We have inserted John, s0300, New Jersey, 28, and M. Wherein

John= Employee name
s0300=Employee code
New Jersey=Employee adress
28=Employee age
M=Employee Sex.

Corruption in Employee Details Table: Corruption in the above table can happen due to severely reasons like operating system failure, power failure, hardware problem, metadata structure corruption, virus attack, and many more.

How to Repair?: When MySQL database tables get corrupted or damaged, you can repair and restore corrupted MySQL table by carrying out the below mentioned methods.

PhpMyAdmin Method
Third party repair software method

Repair using phpMyAdmin: Follow the below steps to repair corrupt MySQL database table through phpmyadmin.

  • Login to the phpmyadmin.
  • Select the database.
  • Note: if you have only one database then it will be selected by default.
  • Goto to the main panel and choose database.
  • Select the corrupted MySQL database table.
  • Goto to the bottom of the window and click on the drop down menu.
  • Select Repair Table from the menu.
  • And phpmyadmin automatically fix the corruption in the table.

Third party repair software: If you are unable to repair corrupt MySQL table through above mentioned method then you should try any third party MySQL repair software. MySQL repair software is very helpful in most of the corruption cases and repair table up to ninety nine percent. These software are safe in nature and don't harm your database.

Top three MySQL database repair software: Top three MySQL database repair software are stellar phoenix database recovery for MySQL, recovery for MySQL, recovery toolbox for MySQL.

Tuesday, July 19, 2011

How to Restore Corrupt MySQL Database Tables

MySQL database is a registered product of sun Microsystems. It is platform independent in nature that means a database administrator can install MySQL database on different operating systems like windows, Linux, and others. MySQL database uses tables for storing the data and records. Sometimes these tables get corrupted by the several reasons like virus attach, software malfunction, improper system shutdown, hardware problem, and so on. When you are trying to repair corrupt mysql database by “mysqlicheck” command but unable to fix then you can try lower level of mysqlicheck command.

You can use lower level of mysqlcheck command in following manner:

Stop Server Process: To use lower level command of mysqlicheck, you should have to stop the server process. You can do it by using service MySQL stop query.

Find Data Files: After end of the server process, you will have to find the data files where tables store. The data files usually present in var/lib/mysql/database_name.

 Now, you can run the given following command against the table.

myisamchk -r -v -f --sort_buffer_size=128M --key_buffer_size=128M /var/lib/mysql/database/table.MYI    

Now, corruption in the mysql table has been fixed

Replace Database: You can replace corrupt database/table with repaired database/table.

Note: In most of the cases, above inbuilt command is able to fix the corruption in tables but sometimes fail to repair. Most of the database administrators recommend to try third party MySQL database recovery software to fix corruption in the MySQL table.

PS: Always try demo version of any software before purchase.

Friday, July 1, 2011

How to Repair Corrupt Table of MySQL Database?

MySQL database has tables to store data. All Big and small organizations use MySQL database for storing the employee's records.  A database administrator can do various operations on table like insert, delete, retrieve, arrange, and many more. Tables are very prone to corruption, there may be various reasons for corruption like Unexpected server shutdown, faulty hardware, virus attach, and more.

Let’s consider a scenario, wherein a database administrator is trying to access MySQL database table and got below error message.

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

The above error message states that employee's table is corrupt and need to repair.

How to Fix: A database administrator can fix the above error message by the two methods.

1. Repair Table using PHPMyAdmin
2. Repair Table using myisamchk command 

1. Repair Table using PHPMyAdmin: If you have installed PHPMyAdmin on your MySQL server then use this method and follow the following steps:
  • Login to PHPMyAdmin
  • Choose database that has corrupt table.
  • Go to the main panel.
  • Go to the list of tables and select the table that you want to repair.
  • And finally click on the “Repair Table” button.
  • You have done it.
2. Repair Table using myisamchk Command: If you have not installed the PHPMyAdmin on your MySQL server then you can repair corrupt MySQL table via storage engine of MySQL database. Run below script of myisamchk command with r option to repair the corrupt MySQL database table. 

# myisamchk -r profiles.MYI
recovering (with sort) MyISAM-table 'profiles.MYI'
Data records: 80
Fixing index 1
Fixing index 2
Fixing index 3

Last Minute: Sometimes, PHPMyAdmin and myisamchk command are not able to fix badly corrupt MySQL database. At this time, it is recommended you to try any third party MySQL database repair software to fix the corrupt table.

Note: Always try free demo version of any software before complete download.

Friday, June 3, 2011

Discussing MySQL database corruption and an effective resolution for MySQL Recovery

You might have faced circumstances wherein you require transferring your MySQL databases to some other SQL Server. In such situation, it is necessary to create a database dump, which would comprise the structure of database tables and probably a list of SQL statements. This dump can be used for backup purposes in any distressing event of database corruption or inaccessibility. In MySQL, a database is dumped using the 'mysqldump' client. Sometimes you face problems while performing this operation. This unusual behavior is normally caused due to database corruption. As a consequence, you might lose access to your precious database components. To overcome this problem, you need to go for MySQL recovery through a reliable third-party utility.

For instance, when you attempt to dump one of your important MySQL databases, you may receive the following error message on your screen:

[root@www diaendomet]# mysqldump -ucojjohealth -p --all-databases >
alldatabases.sql
Enter password:
mysqldump: Got error: 29: File '../diaendomet/users.MYD' not found
(Errcode: 2) when using LOCK TABLES

Cause:

The above error occurred because of corruption in your MySQL database. The database may get corrupt due to reasons, such as virus infections, application errors, operating system bugs etc.

Corruption will make all the database components inaccessible and you may face a critical data loss situation. In this case, a backup will help to restore all the lost or inaccessible data. However, if the backup is missing, follow the below given resolution to recover MySQL database.

Resolution:
  • Try the procedure described below to resolve the problem-
  • Stop the MySQL server by killing a process named 'mysqld'.
  • Switch to the directory '$MYSQL_DATA_DIR'
  • Run the 'myisamchk' utility as follows:
myisamchk */*.myi
This will repair all the tables present in the directory.
  • Now, start the server and try to dump the database again using the 'mysqldump' utility.

If the problem still persists, you should take help of a MySQL database recovery software. These software are backed by efficient scanning algorithms to perform a complete recovery of the corrupt MySQL database. They can effectively repair and retrieve all the damaged database objects, including tables, relations, keys, constraints, queries etc.

Free download MySQL recovery software from here:
http://www.mysql-database-recovery.com/free-download.php

* Free Download offers free evaluation of the software & preview all the lost files and folder that can be recovered by the software.

Wednesday, April 20, 2011

The Safe Way to Recover MySQL Database

MySQL is a relational database application, which is widely used for many web based projects. Like any other database application, MySQL also stores various important data. Hence, any problem with the database, results in the complete inaccessibility of the valuable data, which may lead to huge business loss. However, there are many MySQL recovery software that can help you deal with the MySQL problems and recover your precious data back.

MySQL runs as a database server and provides multi-user access to many different databases. For its usability and features, this application is used by many big World Wide Web products, such as Google, Wikipedia, Facebook etc. However, there are occasions, when MySQL gets corrupted and all the data in it becomes completely inaccessible.

There are thousands of such reasons behind possible MySQL corruption. Below listed, are some of the most prominent ones:

1. Unexpected MySQLD (MySQL Server) shutdown
2. Operating system corruption
3. Virus or Malware infection
4. Corruption of files: ".myd", ".frm" and ".myi"
5. Damage to the Metadata structure
6. MySQL bugs
7. Damage to the "ibdata" file
8. Configuration problem etc.

In all the above situations, your MySQL becomes completely inaccessible until it is being repaired by any effective MySQL recovery application.

These software are developed with many fine search algorithms that can scan the whole drive and gather every detail about the inaccessible MySQL database. These powerful utilities are able to repair the database and retrieve the data even in case of severe corruption.

Before running the repairing utility, you need to handle the drive with extreme care. The drive must be guarded against any further corruption or overwriting of the MySQL database in it. Moreover, the software selection is very crucial, as you need to ensure the read-only property of the software, you are using.

However, most of the available MySQL recovery software are completely risk-free in nature and you can run them on your precious database without worrying about the safety of the data in it. Apart from this, these utilities are developed with detailed instructions based graphical user interfaces, which do not require any further assistance in using them.

Stellar Phoenix MySQL Recovery is a wonderful utility to recover MySQL database safely. The software can help you to retrieve your tables, views, relations etc. from both InnoDB as well as MyISAM database engines. This software is developed to work on MySQL 6.x, 5.x, 4.x, 3.x and is compatible with almost all recent Windows operating systems.

Mark willium is an Internet interpreter doing research on the application, that recover corrupted MySQL database and its objects like tables, views, relations and many more.

For More Details about MySQL database recovery software Visit http://www.mysql-database-recovery.com/.

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

Article Source: http://EzineArticles.com/6192953