<< previous page   --   table of contents   --   next page >>
| | | | | | | |
  • Return to Table of Contents
  • Table of Contents

    1. General Information
    2. MySQL Installation
    3. Tutorial Introduction
    4. Database Administration
    5. MySQL Optimisation
    6. MySQL Language Reference
    7. MySQL Table Types
    8. MySQL APIs
    9. Extending MySQL

    Chapter 4:  Database Administration 231 REPAIR TABLE tbl_name[,tbl_name...] [QUICK] [EXTENDED] [USE_FRM] REPAIR TABLE  only  works  on  MyISAM  tables  and  is  the  same  as  running  myisamchk -r table_name on the table. Normally you should never have to run this command, but if disaster strikes you are very likely to get back all your data from a MyISAM table with REPAIR TABLE.  If your tables get corrupted a lot you should try to nd the reason for this!  See Section A.4.1 [Crashing], page 640.  See Section 7.1.3 [MyISAM table problems], page 500. REPAIR TABLE  repairs a possible corrupted table.  The command returns a table with the following columns: Column Value Table Table name Op Always \repair" Msg type One  of  status,  error,  info  or warning. Msg text The message. Note that you can get many rows of information for each repaired table.  The last one row will be of  Msg_type status  and should normally be  OK.  If you don't get  OK, you should try repairing the table with myisamchk -o, as REPAIR TABLE does not yet implement all the options of myisamchk.  In the near future, we will make it more exible. If QUICK is given then MySQL will try to do a REPAIR of only the index tree. If you use EXTENDED then MySQL will create the index row by row instead of creating one index at a time with sorting;  this may be better than sorting on xed-length keys if you have long char() keys that compress very good. As of MySQL 4.0.2 there is a USE_FRM mode for REPAIR.  Use it if the `.MYI' le is missing or if its header is corrupted.  In this mode MySQL will recreate the table, using information from the `.frm' le.  This kind of repair cannot be done with myisamchk. 4.4.6  Using myisamchk for Table Maintenance and Crash Recovery Starting with MySQL Version 3.23.13, you can check MyISAM tables with the CHECK TABLE command.  See Section 4.4.4 [CHECK TABLE], page 229.  You can repair tables with the REPAIR TABLE command.  See Section 4.4.5 [REPAIR TABLE], page 230. To check/repair MyISAM tables (`.MYI' and `.MYD') you should use the myisamchk utility. To check/repair ISAM tables (`.ISM' and `.ISD') you should use the isamchk utility.  See Chapter 7 [Table types], page 494. In the following text we will talk about myisamchk, but everything also applies to the old isamchk. You can use the myisamchk utility to get information about your database tables, check and repair them, or optimise them.  The following sections describe how to invoke myisamchk (including a description of its options), how to set up a table maintenance schedule, and how to use myisamchk to perform its various functions. You  can,  in  most  cases,  also  use  the  command  OPTIMIZE TABLES  to  optimise  and  repair tables, but this is not as fast or reliable (in case of real fatal errors) as myisamchk.  On the
     

    Customer Support CentreMySQL Reference Manual

    Web Hosting Services
    UNIX WEB HOSTING
    SUPPORT & FAQ's
    TERMS OF USE
    Domain Services
    DOMAIN REGISTRATION
    MANAGE YOUR ACCOUNT
    SUPPORT & FAQ's
    TERMS OF USE
    SITE MAP
    Home
    Hosting Plans | Domain Registration | About Us | Contact Us | Site Map
    Terms of Use | Privacy Policy | Guarantees
    Merchant Accounts

    SpiritHost - web hosting for spiritual and education sites
    SpiritHit.com - Religious and Spiritual Portal
  • Return to Table of Contents
  • Back to top

  • Web Hosting: Manuals & FAQ's

    1. Unix-Based Web Hosting
    2. Unix Dedicated Servers
    3. Windows Dedicated Servers
    4. CuteFTP User’s Guide
    5. CuteHTML User’s Guide
    6. WS_FTP Pro User's Guide
    7. Miva Order User's Guide
    8. Miva Merchant User's Guide