An appealing write-up we found which has several aspects to study. You could take a look to see what you think.
The mysqldump utility is a MySQL database backup program that enables you to copy (or dump) a database to another SQL Server. This server may not necessarily be another MySQL Server. On most occasions, the MySQL dump contains SQL statements that are used to create tables and insert records in them. You can generate the data in the mysqldump utility in CSV or XML format as well. However, sometimes you are unable to use this utility to dump the database. Such problems can occur due to corruption in the database. The database corruption can occur due to various reasons such as virus infections, power outages, bugs in MySQL version, hardware issues, etc. In such cases, you should find out the cause of the problem and try to resolve the issue. If you are unable to fix the error, then you should use a third-party MySQL repair software to perform MySQL recovery.
Consider a scenario wherein you are working on a MySQL database in which you want to dump a MySQL database to another location. However, you are unable to dump the database and an error message is displayed, that is:
[root@www diaendomet]# mysqldump -ucojjohealth -p –all-databases >
mysqldump: Got error: 29: File ‘../diaendomet/users.MYD’ not found
(Errcode: 2) when using LOCK TABLES
The primary cause of this erroneous situation is that the MySQL database is corrupted. It has corrupted due to any of the various reasons discussed in the introductory paragraph.
To resolve the situation, you should perform the following steps:
Stop the MySQL server.
Change the working directory to $ MYSQL_DATA_DIR
Run the myisamchck utility as displayed: run myisamchck with */*.MYD. This command will complete a check on all the table files and repair wherever it finds any error.
Restart the MySQL server and try to repeat the database dump. It should run fine now.
However, there may be instances when this resolution does not provide the solution to the problem. This would invariably mean that the database is severely corrupted. In such cases, you should use a third-party MySQL recovery software to repair MySQL database. Such MySQL repair tools are read-only in nature that do not overwrite the existing database while performing MySQL recovery.
Stellar Phoenix Database Recovery for MySQL is a MySQL repair software that is able to repair MySQL from all instances of logical corruption. It is able to recover MySQL database components such as tables, queries, etc. This MySQL recovery utility supports InnoDB and MyISAM database engines. It is compatible with Windows 7, Vista, Server 2003, XP, and 2000. In addition, this MySQL repair software is specifically designed to recover MySQL databases created in MySQL 4.x and5.x.
I thought that was interesting. Feel free to leave your comments below.