<< 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 239 myisamchk -e -i tbl_name Like the previous command, but the -i option tells myisamchk to print some informational statistics, too. 4.4.6.9  How to Repair Tables In the following section we only talk about using myisamchk on MyISAM tables (extensions `.MYI' and `.MYD').  If you are using ISAM tables (extensions `.ISM' and `.ISD'), you should use isamchk instead. Starting  with  MySQL  Version  3.23.14,  you  can  repair  MyISAM  tables  with  the  REPAIR TABLE command.  See Section 4.4.5 [REPAIR TABLE], page 230. The symptoms of a corrupted table include queries that abort unexpectedly and observable errors such as these:    `tbl_name.frm' is locked against change    Can't nd le `tbl_name.MYI' (Errcode:  ###)    Unexpected end of le    Record le is crashed    Got error ### from table handler To get more information about the error you can run perror ###.  Here is the most common errors that indicates a problem with the table: shell> perror 126 127 132 134 135 136 141 144 145 126 = Index file is crashed / Wrong file format 127 = Record-file is crashed 132 = Old database file 134 = Record was already deleted (or record file crashed) 135 = No more room in record file 136 = No more room in index file 141 = Duplicate unique key or constraint on write or update 144 = Table is crashed and last repair failed 145 = Table was marked as crashed and should be repaired Note that error 135, no more room in record le, is not an error that can be xed by a simple repair.  In this case you have to do: ALTER TABLE table MAX_ROWS=xxx AVG_ROW_LENGTH=yyy; In the other cases, you must repair your tables.  myisamchk can usually detect and x most things that go wrong. The repair process involves up to four stages, described here.  Before you begin, you should cd to the database directory and check the permissions of the table les. Make sure they are readable by the Unix user that mysqld runs as (and to you, because you need to access the les you are checking).  If it turns out you need to modify les, they must also be writable by you. If you are using MySQL Version 3.23.16 and above, you can (and should) use the CHECK and REPAIR commands to check and repair MyISAM tables.  See Section 4.4.4 [CHECK TABLE], page 229.  See Section 4.4.5 [REPAIR TABLE], page 230.
     

    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