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.