mysql表不可用_一些数据表不可用,也许需要修复数据库 WordPress后台错误的完美修复处理方法...

今天访问维护的wordpress网站, 出现错误: 建立数据库连接时出错

本以为mysql服务挂了, 结果访问同服务器上的另一个网站没有问题,登陆后台提示: 一些数据表不可用,也许需要修复数据库。

be3e111d0bafaaa3cc28e4ac5371f1af.png

点击修复数据库,提示需在配置文件(wp-config.php)加选项:define(‘WP_ALLOW_REPAIR’, true);

去wordpress的数据库配置配置文件(wp-config.php)添加如下代码:

PHP

define(‘WP_ALLOW_REPATR’,true);

1define(‘WP_ALLOW_REPATR’,true);

点击刚刚页面的“修复数据库”

下面是修复log日志:

————————————————–

wp_users 数据表正常。

wp_users 数据表已优化过了。

“wp_usermeta”数据表有问题。报告的问题是:1 client is using or hasn’t closed the table properly。WordPress 正在尝试进行修复…

无法修复 wp_usermeta 表。错误消息:1 client is using or hasn’t closed the table properly

“wp_posts”数据表有问题。报告的问题是:1 client is using or hasn’t closed the table properly。WordPress 正在尝试进行修复…

无法修复 wp_posts 表。错误消息:1 client is using or hasn’t closed the table properly

“wp_comments”数据表有问题。报告的问题是:85 clients are using or haven’t closed the table properly。WordPress 正在尝试进行修复…

无法修复 wp_comments 表。错误消息:85 clients are using or haven’t closed the table properly

wp_links 数据表正常。

“wp_options”数据表有问题。报告的问题是:Table is marked as crashed。WordPress 正在尝试进行修复…

无法修复 wp_options 表。错误消息:Table is marked as crashed

“wp_postmeta”数据表有问题。报告的问题是:1 client is using or hasn’t closed the table properly。WordPress 正在尝试进行修复…

无法修复 wp_postmeta 表。错误消息:1 client is using or hasn’t closed the table properly

wp_terms 数据表正常。

wp_term_taxonomy 数据表正常。

wp_term_relationships 数据表正常。

wp_commentmeta 数据表正常。

部分数据库问题无法修复。请复制下列错误信息,前往 WordPress 支持论坛寻求帮助。

wp_usermeta: 1 client is using or hasn’t closed the table properly

wp_posts: 1 client is using or hasn’t closed the table properly

wp_comments: 85 clients are using or haven’t closed the table properly

wp_options: Table is marked as crashed

wp_postmeta: 1 client is using or hasn’t closed the table properly

修复完成。请移除刚刚在wp-config.php中添加的那行代码,以防他人滥用本页面。

PHP

define(‘WP_ALLOW_REPAIR’, true);

1define(‘WP_ALLOW_REPAIR’,true);

完成数据库表的修复,网站就恢复正常了。

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值