Teach you The fault detection of MySQL database table

Source: Internet
Author: User

You may be in the process of using MySQL, all kinds of accidents cause damage to the database table, and this data is often the most recent data, it is often impossible to find in the backup data. This chapter describes how to detect the failure of a MySQL database table.

The general process of fault detection and correction for a table is as follows:

Check for errors in the table. If the table checks through, complete the task, or you must fix the database table that is wrong.

Copy the table files before starting the repair to keep the data secure.

Start repairing database tables.

If the repair fails, restore the data from the backup or update log of the database.

Before you use Myisamchk or isamchk to check or fix a table, you should first note:

Establish database backups and use update logs to prevent repair failures and data loss.

Read this chapter carefully before you do it, especially before reading the "Avoid interaction with MySQL server." Because, before you do not have enough knowledge to operate rashly, can cause serious consequences.

If you are maintaining a table on a UNIX platform, you should first register to a dedicated account MySQL to avoid the problem of ownership of table read and write access, and to destroy all permissions on the database directory.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.