推广 热搜: 正太凯盈  机械  iphone  女子  韩国  央行  手机  激光  纽约  出租车 

Discuz数据库security_failedlog错误及修复

   2020-03-24 国联论坛1490
核心提示:最近跑了之前的论坛转了转,发现一直在报数据库中表security_failedlog错误,百度了好久,最终找到解决方案。Discuz! Database Error (145) Table '.\sqglbbs\security_failedlog' is marked as crashed and should be repaired SELECt count(*) FROM security_failedlog
 最近跑了之前的论坛转了转,发现一直在报数据库中表security_failedlog错误,百度了好久,最终找到解决方案。

何为pre_security_failedlog:

pre_security_failedlog:防水墙失败日志记录。

问题现象


Discuz! Database Error

(145) Table '.\sqglbbs\security_failedlog' is marked as crashed and should be repaired
SELECt count(*) FROM security_failedlog

PHP Debug

No. File Line Code
1 index.php 132 require(%s)
2 forum.php 63 runhooks()
3 source/function/function_core.php 1124 hookscript(%s, %s, %s, Array, %s)
4 source/function/function_core.php 1173 call_user_func(Array, Array)
5     plugin_security->common(Array)
6 source/plugin/security/security.class.php 43 plugin_security->_reportLoginUser(Array)
7 source/plugin/security/security.class.php 225 Cloud_Service_Security->reportLogin(%s)
8 source/plugin/manyou/Service/Security.php 168 Cloud_Service_Security->logFailed(%s, Array)
9 source/plugin/manyou/Service/Security.php 600 Cloud_Service_Security->_checkAndClearFailNum()
10 source/plugin/manyou/Service/Security.php 700 discuz_table->count()
11 source/class/discuz/discuz_table.php 50 discuz_database::result_first(%s)
12 source/class/discuz/discuz_database.php 118 discuz_database::query(%s, Array, false, false)
13 source/class/discuz/discuz_database.php 137 db_driver_mysql->query(%s, false, false)
14 source/class/db/db_driver_mysql.php 152 db_driver_mysql->halt(%s, %d, %s)
15 source/class/db/db_driver_mysql.php 223 break()

解决方案

1.直接关闭防水墙(治标不治本)

由于这是插件防水墙的缘故,最简单的就是进入后台关掉。但这只治标不治本,最好去数据库修复一下。若不修复,在更新论坛版本时会提示如下:

2.修复或重建security_failedlog表

进入mysql数据库

修复(修复解决不了就删除)表pre_security_failedlog:,删除前请备份

 

DROP TABLE  pre_security_failedlog;

下面 这个也可以,只是我已经确定存在了,就直接用的上面的

DROP TABLE IF EXISTS pre_security_failedlog;

重建表

CREATE TABLE pre_security_failedlog ( id int(11) NOT NULL

AUTO_INCREMENT, reporttype char(20) NOT NULL, tid int(10)

unsigned NOT NULL DEFAULT '0', pid int(10) unsigned NOT NULL

DEFAULT '0', uid int(10) unsigned NOT NULL DEFAULT '0',

failcount int(10) unsigned NOT NULL DEFAULT '0', createtime int

(10) unsigned NOT NULL DEFAULT '0', posttime int(10) unsigned

NOT NULL DEFAULT '0', delreason char(255) NOT NULL, scheduletime

int(10) unsigned NOT NULL DEFAULT '0', lastfailtime int(10)

unsigned NOT NULL DEFAULT '0', extra1 int(10) unsigned NOT NULL,

extra2 char(255) NOT NULL DEFAULT '0', PRIMARY KEY (id), KEY pid

(pid), KEY uid (uid) ) ENGINE=MYISAM DEFAULT CHARSET=gbk

修复表的过程就不再写了,有兴趣的朋友们可以自己探索下。

 
反对 0举报 0 收藏 0 打赏 0评论 0
 
更多>同类资讯
推荐图文
推荐资讯
点击排行