I have a table that has thousands of data, I want to set auto repair in the table. Will mysql support auto repair? What is the syntax? MySQL provides two options: When the table is repaired and checked, the
- MySQL distribution ships are placed with a device called "," specifically to check and repair MyISAM tables (the default table type used by MySQL). This tool can scan your database, identify problems, optimize tests for faster lookup, and optionally repair corrupted tables. The Myisamchk tool is implemented from the command line.
-
In addition to the above tools, MySQL also allows you to check and repair tables using SQL command. The check tab, and the optimal table command, can be used on the running MySQL server and it must be entered through a MySQL client.
Example: Repair [NO_WRITE_TO_BINLOG | Local] table tbl_name [, tbl_name] ... [QUICK] [extended] [USE_FRM]
Most of the time, it is better to use myisamchk Because it is much faster than the SQL commands.
Regarding the "auto" part of the repairs, I suggest that do not habit with repairing tables I think as if you are looking for a pump so that the water can be removed from the leak. What will be the obvious thing to fix the cause of the leakage and problem?
Remove some memory heavy tasks or upgrade your server Automatically correction corrupt tables relied on a script or something - is a bad idea.
Comments
Post a Comment