MySQL Development Advanced Article Series 34 Tool Mysqlcheck (MyISAM Table Maintenance tool)

Source: Internet
Author: User

I. Overview

The Mysqlcheck client tool can examine and repair MyISAM tables, and can also optimize and parse tables. In fact, it integrates the Check,repair,analyze,optimize functionality in the MySQL tool, does not support memory tables for check, and repair does not support INNODB tables. Mysqlcheck runs only when the database is running, which means that service operations are not stopped.
Here are three ways to call Mysqlcheck:
    

The following options are commonly used in option:

-C,--check

Check table

-R,--repair

Repair table

-A,--analyze

Analysis table

-O,--optimize

Optimizing tables

1.1 Checklist (check)

pwd/usr/local/mysql//usr/local/mysql/bin/mysqlcheck-uroot-p-C test

    

It's checked in the test library, and A is OK.

1.2 Repair table (repair)

[Email protected] data]#/usr/local/mysql/bin/mysqlcheck-uroot-p-R test

    
A new InnoDB Type B table was created in the test library, showing that table B does not support repair.
1.3 Analysis Table (analyze)

[[email protected] data]#/usr/local/mysql/bin/mysqlcheck-uroot-p-a test

    
1.4 Optimization Table (optimize)

[Email protected] data]#/usr/local/mysql/bin/mysqlcheck-uroot-p-o test

    

MySQL Development Advanced Article Series 34 Tool Mysqlcheck (MyISAM Table Maintenance tool)

Related Article

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.