For mysql database you may get the following error:
Fix “WordPress database error Table … is marked as crashed and should be repaired”
WordPress database error Table … is marked as crashed and last repair (automatic?) failed.
We can fix this error using the following commands:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
[user@server ~/public_html]$ mysql -u user -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1120449 Server version: 5.1.48 MySQL Community Server (GPL) Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL v2 license Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show databases; Connection id: 1120477 Current database: database > use YOUR_DATABASE; > show tables; > use YOUR_TABLE_NAME; mysql> select * from prefix_posts limit 1; ERROR 145 (HY000): Table './database/prefix_posts' is marked as crashed and should be repaired mysql> repair table prefix_posts; +-----------------------+--------+----------+----------+ | Table | Op | Msg_type | Msg_text | +-----------------------+--------+----------+----------+ | database.prefix_posts | repair | status | OK | +-----------------------+--------+----------+----------+ 1 row in set (3.56 sec) mysql> select * from prefix_posts limit 1; +----+-------------+---------------------+---------------------+--------------+------------+---------------+--------------+-------------+----------------+-------------+---------------+-----------+---------+--------+---------------------+---------------------+-----------------------+-------------+------------------------------------------------------------+------------+------------+----------------+---------------+ | ID | post_author | post_date | post_date_gmt | post_content | post_title | post_category | post_excerpt | post_status | comment_status | ping_status | post_password | post_name | to_ping | pinged | post_modified | post_modified_gmt | post_content_filtered | post_parent | guid | menu_order | post_type | post_mime_type | comment_count | +----+-------------+---------------------+---------------------+--------------+------------+---------------+--------------+-------------+----------------+-------------+---------------+-----------+---------+--------+---------------------+---------------------+-----------------------+-------------+------------------------------------------------------------+------------+------------+----------------+---------------+ | 12 | 8 | 2008-05-20 10:09:49 | 2008-05-20 15:09:49 | | 308image1 | 0 | | inherit | open | open | | 308image1 | | | 2008-05-20 10:09:49 | 2008-05-20 15:09:49 | | 0 | http://gaarai.com/wp-content/uploads/2008/05/308image1.gif | 0 | attachment | image/gif | 0 | +----+-------------+---------------------+---------------------+--------------+------------+---------------+--------------+-------------+----------------+-------------+---------------+-----------+---------+--------+---------------------+---------------------+-----------------------+-------------+------------------------------------------------------------+------------+------------+----------------+---------------+ 1 row in set (0.00 sec) mysql> exit Bye [user@server ~/public_html]$ |
Fix “WordPress database error Table … is marked as crashed and should be repaired”
[Read More...]