How to fix mysql Databases

Source: Internet
Author: User
Sometimes the database is damaged due to power loss or other reasons. We can use the mysql mysqlcheck command to quickly repair all databases or specific databases. For example, we can check, optimize, and fix all databases: 1. run CMD to start the command line. 2. enter the Bin directory of Mysql: E: ProgramFilesMySQLMySQLSer

Sometimes the database is damaged due to power loss or other reasons. We can use the mysql mysqlcheck command to quickly repair all databases or specific databases. For example, we can check, optimize, and fix all databases: 1. run CMD to start the command line. 2. go to the Bin directory of Mysql: E: \ Program Files \ MySQL Ser

Sometimes the database is damaged due to power loss or other reasons. We can use the mysql command to quickly fix all databases or specific databases. For example
Check to optimize and fix all databases:

1. Enter CMD in the running process to start the command line.

2. Go to the Bin directory of Mysql: E: \ Program Files \ MySQL Server 5.0 \ bin. If you do not know how to enter another directory, you should refer to the online materials for basic knowledge.
Common Methods:
Run E:
Run CD "E: \ Program Files \ MySQL Server 5.0 \ bin"

3. Run: mysqlcheck-A-o-r-uroot-p888888
Note: Change 888888 to your own root user password.

Mysql. columns_priv OK
Mysql. db OK
Mysql. func OK
Mysql. help_category OK
Mysql. help_keyword OK
Mysql. help_relation OK
Mysql. help_topic OK
Mysql. host OK
Mysql. tables_priv OK
Mysql. time_zone OK
Mysql. time_zone_leap_second OK
Mysql. time_zone_name OK
Mysql. time_zone_transition OK
Mysql. time_zone_transition_type OK
Mysql. user OK
......
......
......

Note!



If an error prompt is displayed during the repair process, it indicates that the table is broken and cannot be repaired. For mysql databases with bad tables, you can only delete or stop it, otherwise, it will affect the stability of Mysql and cause mysql to stop automatically. (The table "the storage engine for The table doesn't support repair" does not need to be processed)


You can run
Mysqlcheck-A-o-r-uroot-p888888> C: \ test.txt

After running test.txt, you can see it.

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.