#11 phpmylibrary 2.0.4-indexing _tblabstractindex crashed

closed
None
5
2006-02-23
2006-02-09
Anonymous
No

mysql> select * from _tblabstractindex limit 5;
ERROR 1016 (HY000): Can't open file:
'_tblabstractindex.MYI' (errno: 145)
mysql> \q

root@host:/var/www # perror 145
Error code 145: Unknown error 145
MySQL error: 145 = Table was marked as crashed and
should be repaired
root@host:/var/www #

Discussion

  • Nobody/Anonymous

    Logged In: NO

    http://dev.mysql.com/doc/refman/5.0/en/repair.html

    mysql> select * from _tblabstractindex limit 5;
    ERROR 1016 (HY000): Can't open file: '_tblabstractindex.MYI'
    (errno: 145)
    mysql> \q

    Stage 2: Easy safe repair

    First, try myisamchk -r -q tbl_name (-r -q means “quick
    recovery mode”). This attempts to repair the index file
    without touching the data file. If the data file contains
    everything that it should and the delete links point at the
    correct locations within the data file, this should work,
    and the table is fixed. Start repairing the next table.
    Otherwise, use the following procedure:

    1.

    Make a backup of the data file before continuing.
    2.

    Use myisamchk -r tbl_name (-r means “recovery mode”).
    This removes incorrect rows and deleted rows from the data
    file and reconstructs the index file.
    3.

    If the preceding step fails, use myisamchk
    --safe-recover tbl_name. Safe recovery mode uses an old
    recovery method that handles a few cases that regular
    recovery mode does not (but is slower).

    Note: If you want a repair operation to go much faster, you
    should set the values of the sort_buffer_size and
    key_buffer_size variables each to about 25% of your
    available memory when running myisamchk.

    If you get unexpected errors when repairing (such as out of
    memory errors), or if myisamchk crashes, go to Stage 3.

    myisamchk -r -q _tblabstractindex

    root@host:/var/www # perror 145
    Error code 145: Unknown error 145
    MySQL error: 145 = Table was marked as crashed and should
    be repaired
    root@host:/var/www #

    Stop the mysql first

    root@host:/var/www # /etc/init.d/mysql stop
    Stopping MySQL database server: mysqld.

    root@host:/var/www # cd /var/lib/mysql/phpmylibrary
    root@host:/var/lib/mysql/phpmylibrary # myisamchk -r
    _tblabstractindex
    - recovering (with sort) MyISAM-table '_tblabstractindex'
    Data records: 3308
    - Fixing index 1
    - Fixing index 2
    - Fixing index 3
    root@host:/var/lib/mysql/phpmylibrary #

    root@host:/var/lib/mysql/phpmylibrary # /etc/init.d/mysql start
    Starting MySQL database server: mysqld.

     
  • Charles Fiddler

    Charles Fiddler - 2006-02-23
    • assigned_to: nobody --> polerio
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks