mysql 表损坏 修复表_如何修复MySQL表?

mysql 表损坏 修复表

After a server crash and restarting, MyBB reports a SQL Error as follows:

服务器崩溃并重新启动后,MyBB会报告一个SQL 错误 ,如下所示:

MyBB SQL Error
MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
145 - Table './mybb/mybb_sessions' is marked as crashed and should be repaired
Query:
SELECT * FROM mybb_sessions WHERE sid='40021925bd0494ea31...' AND ip='x.x.x.x' LIMIT 1

The dababase is MySQL. Please help. Thank you!

dababase是MySQL 。 请帮忙。 谢谢!

You can repair the table following these steps:

您可以按照以下步骤修复表:

  1. Connect to the MySQL management console (through the mysql command) to the MySQL DB.

    连接到MySQL管理控制台(通过mysql命令)到MySQL DB。

  2. Choose the DB by executing:

    通过执行以下操作选择数据库:

    use mybb;

    use mybb;

  3. repair the mybb_sessions table by executing:

    通过执行以下命令来修复mybb_sessions表:

    repair table mybb_sessions;

    repair table mybb_sessions;

If you can not use the console, you can execute the SQL in phpMyAdmin:

如果无法使用控制台,则可以在phpMyAdmin中执行SQL:

  1. Access phpMyAdmin

    访问phpMyAdmin

  2. Select your the mybb database

    选择您的mybb数据库

  3. Click on the “SQL” tab on the right side

    点击右侧的“ SQL”标签

  4. Type in the following SQL and execute it

    输入以下SQL并执行

    repair table mybb_session;

    repair table mybb_session;

Answered by anonymous.
匿名回答。

翻译自: https://www.systutorials.com/how-to-repair-a-mysql-table/

mysql 表损坏 修复表

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值