浏览 4057 次 / [ 天下网闻 ] Discuz错误:[145] Table '.\***\common_credit_rule_log' 解决方法
  • 发布时间 2013-03-24 08:52
  • 因服务器断电空间不足,或突然断电,重启等不稳定问题产生本错误,轻度表现为前台可见,后台无法登陆,或后台常常意外失效等情况,严重的整站都无法浏览:

    Error messages:
    • [Type] 查询语句错误
    • [145] Table '.\*****\common_credit_rule_log' is marked as crashed and should be repaired
    • [Query] SELECT * FROM common_credit_rule_log WHERE uid='9' AND rid='15' AND fid='0'
    Program messages:
    • [Line: 0050]forum.php(discuz_core->init)
    • [Line: 0071]source\class\class_core.php(discuz_core->_init_misc)
    • [Line: 0488]source\class\class_core.php(updatecreditbyaction)
    • [Line: 1210]source\function\function_core.php(credit->execrule)
    • [Line: 0048]source\class\class_credit.php(credit->getrulelog)
    • [Line: 0451]source\class\class_credit.php(DB->query)
    • [Line: 0842]source\class\class_core.php(DB->_execute)

    提示以上或类似信息,common_credit_rule_log丢失等错误解决方法如下:

    修复表common_credit_rule_log
    用记事本等,把下面这段保存为一个php文件 名字任意 上传到根网站目录 然后在浏览器上打开它,如:www.doooor.com/abc.php
    点击start 出现ok字样表示完成 用完以后记得删除

    ok.jpg

    <?php
    require './config/config_global.php';
    define('host', $_config['db']['1']['dbhost']);
    define('db', $_config['db']['1']['dbname']);
    define('user', $_config['db']['1']['dbuser']);
    define('pass', $_config['db']['1']['dbpw']);
    $link = mysql_connect(host, user, pass);
    if (!$link) die('Conection error!');
    if (!mysql_select_db(db, $link)) die ('DB error!');
    if($_POST['button']){
    mysql_query("REPAIR TABLE  `pre_common_credit_rule_log`;");
    echo 'OK';
    }
    ?>
    <form method="post">
    <input type="submit" name="button" value="start">
    </form>


    如同时提升其他表错误,可以到phpmyadmin查找对应表,打钩后底部下拉选择修复,如下图

    pre_ucenter_members 修复表.jpg