How to use MySQL database Mysqlcheck

Source: Internet
Author: User

mysql database Mysqlcheck The use of knowledge is the main content of this article, we know, Mysqlcheck, is the MySQL comes with can check and repair MyISAM table, And it can also optimize and analyze tables, mysqlcheck functions like Myisamchk, but its work is different.

The main difference is that when the MYSQLD server is running, you must use Mysqlcheck, and MYISAMCHK applies to the server when it is not running.

The advantage of using Mysqlcheck is that you do not need to stop the server to check or repair the table. Failure to use MYISAMCHK repair is irreversible.

1 - - - - - -- all-databases-uroot-p  

You can optimize all of the DB
Parameter implication:
-A = analyse given tables.
-c = Check table for errors
-O = Optimise table
-r = Can fix almost anything except unique keys that aren ' t unique
-M =--medium-check

1. If you need to check and repair all database data tables, you can use:

1 - - - - P   2 # Enter Password:    3 database1 OK   4

2. If you need to repair the specified database

1 - - - -

3. If you use a different user name to fix

1 - - - - - u admin   2 # Enter Password:    3 database1 OK   4  5 Admin Here is the specified MySQL user account.

4. If you use the specified Mysql.sock to enter the database and fix

1     - - - - - /tmp/mysql.sock  2    # Enter Password:   3     database1 OK  4     

About the MySQL database Mysqlcheck the use of the relevant knowledge of the introduction here, I hope this introduction can be a harvest for you!

How to use MySQL database Mysqlcheck

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.