WordPress数据库错误:[表'./db/wp_usermeta'被标记为已崩溃

vnzz0bqm  于 2022-11-22  发布在  WordPress
关注(0)|答案(2)|浏览(110)

我无法登录wp-admin。

  • 信息:我禁用了所有插件。(不工作)*

调试;

WordPress database error: [Table './karabuyu_db/wp_usermeta' is marked as crashed and should be repaired]
SELECT user_id, meta_key, meta_value FROM wp_usermeta WHERE user_id IN (1) ORDER BY umeta_id ASC

我检查了wp_usermeta表,得到了这个错误。

我没有备份,我该如何解决这个问题?:/

fnvucqvd

fnvucqvd1#

在PHPMyAdmin中修复表。它会生成什么输出?

fbcarpbf

fbcarpbf2#

如果您使用Linux服务器为您的WordPress,如CentOS,您可以尝试MySQL命令来检查MySQL数据库的状态,并尝试修复数据库。
WordPress环境:

CentOS 6.6
WordPress 4.5.28
PHP 5.6.24
MySQL 5.5.50

只需使用以下MySQL命令来检查MySQL数据库的状态。

//the following wordpress is the database name of wordpress
mysqlcheck -u root -p wordpress
//and then just input the password of the database

例如:

# mysqlcheck -u root -p wordpress
Enter password: 
wordpress.wp_bwg_album                             OK
wordpress.wp_bwg_album_gallery                     OK
wordpress.wp_bwg_file_paths                        OK
wordpress.wp_bwg_gallery                           OK
wordpress.wp_bwg_image                             OK
wordpress.wp_bwg_image_comment                     OK
wordpress.wp_bwg_image_rate                        OK
wordpress.wp_bwg_image_tag                         OK
wordpress.wp_bwg_shortcode                         OK
wordpress.wp_bwg_theme                             OK
wordpress.wp_commentmeta
warning  : 9 clients are using or haven't closed the table properly
status   : OK
wordpress.wp_comments
warning  : 7 clients are using or haven't closed the table properly
status   : OK
wordpress.wp_cptch_images                          OK
wordpress.wp_cptch_packages                        OK
wordpress.wp_cptch_whitelist                       OK
wordpress.wp_links                                 OK
wordpress.wp_ngg_album                             OK
wordpress.wp_ngg_gallery                           OK
wordpress.wp_ngg_pictures                          OK
wordpress.wp_options
warning  : Table is marked as crashed
warning  : 53 clients are using or haven't closed the table properly
error    : Record at pos: 488396 is not remove-marked
error    : record delete-link-chain corrupted
error    : Corrupt
wordpress.wp_postmeta
warning  : 53 clients are using or haven't closed the table properly
status   : OK
wordpress.wp_posts
warning  : 32 clients are using or haven't closed the table properly
status   : OK
wordpress.wp_sbi_instagram_feed_locator            OK
wordpress.wp_sbi_instagram_feeds_posts             OK
wordpress.wp_sbi_instagram_posts                   OK
wordpress.wp_smush_dir_images                      OK
wordpress.wp_term_relationships
warning  : 12 clients are using or haven't closed the table properly
status   : OK
wordpress.wp_term_taxonomy
warning  : 9 clients are using or haven't closed the table properly
status   : OK
wordpress.wp_termmeta                              OK
wordpress.wp_terms
warning  : 2 clients are using or haven't closed the table properly
status   : OK
wordpress.wp_usermeta
warning  : 16 clients are using or haven't closed the table properly
status   : OK
wordpress.wp_users
warning  : 1 client is using or hasn't closed the table properly
status   : OK

然后使用以下MySQL命令修复数据库。

//the following wordpress is the database name of wordpress
mysqlcheck -u root -p wordpress --auto-repair
//and then just input the password of the database

例如:

# mysqlcheck -u root -p wordpress --auto-repair
Enter password: 
wordpress.wp_bwg_album                             OK
wordpress.wp_bwg_album_gallery                     OK
wordpress.wp_bwg_file_paths                        OK
wordpress.wp_bwg_gallery                           OK
wordpress.wp_bwg_image                             OK
wordpress.wp_bwg_image_comment                     OK
wordpress.wp_bwg_image_rate                        OK
wordpress.wp_bwg_image_tag                         OK
wordpress.wp_bwg_shortcode                         OK
wordpress.wp_bwg_theme                             OK
wordpress.wp_commentmeta                           OK
wordpress.wp_comments                              OK
wordpress.wp_cptch_images                          OK
wordpress.wp_cptch_packages                        OK
wordpress.wp_cptch_whitelist                       OK
wordpress.wp_links                                 OK
wordpress.wp_ngg_album                             OK
wordpress.wp_ngg_gallery                           OK
wordpress.wp_ngg_pictures                          OK
wordpress.wp_options
warning  : Table is marked as crashed
warning  : 53 clients are using or haven't closed the table properly
error    : Record at pos: 488396 is not remove-marked
error    : record delete-link-chain corrupted
error    : Corrupt
wordpress.wp_postmeta                              OK
wordpress.wp_posts                                 OK
wordpress.wp_sbi_instagram_feed_locator            OK
wordpress.wp_sbi_instagram_feeds_posts             OK
wordpress.wp_sbi_instagram_posts                   OK
wordpress.wp_smush_dir_images                      OK
wordpress.wp_term_relationships                    OK
wordpress.wp_term_taxonomy                         OK
wordpress.wp_termmeta                              OK
wordpress.wp_terms                                 OK
wordpress.wp_usermeta                              OK
wordpress.wp_users                                 OK

Repairing tables
wordpress.wp_options
warning  : Number of rows changed from 501 to 502
status   : OK

然后重新启动MySQL服务。
注意事项:

在尝试执行上述命令之前,请先备份数据库。

相关问题