最近跑了之前的论坛转了转,发现一直在报数据库中表security_failedlog错误,百度了好久,最终找到解决方案。
pre_security_failedlog:防水墙失败日志记录。
Discuz! Database Error(144) Table '.bbsdatasecurity_failedlog' is marked as crashed and last (automatic?) repair failedDELETE FROM security_failedlog WHERE pid = 0 AND tid = 0 AND uid = 0 OR lastfailtime = 0 OR failcount >= 10 PHP Debug No.FileLineCode 1index.php126require(%s) 2forum.php53runhooks() 3source/function/function_core.php1064hookscript(%s, %s, %s, Array, %s) 4source/function/function_core.php1110plugin_security->common(Array) 5source/plugin/security/security.class.php45plugin_security->_reportLoginUser(Array) 6source/plugin/security/security.class.php233plugin_security->_retryReport() 7source/plugin/security/security.class.php294Cloud_Service_Security->retryReportData() 8api/manyou/Service/Security.php521table_security_failedlog->deleteDirtyLog() 9source/plugin/security/table/table_security_failedlog.php27discuz_database::delete(%s, %s) 10source/class/discuz/discuz_database.php48discuz_database::query(%s, %s) 11source/class/discuz/discuz_database.php136db_driver_mysql->query(%s, false, true) 12source/class/db/db_driver_mysql.php151db_driver_mysql->halt(%s, %d, %s) 13source/class/db/db_driver_mysql.php218break()
由于这是插件防水墙的缘故,最简单的就是进入后台关掉。但这只治标不治本,最好去数据库修复一下。若不修复,在更新论坛版本时会提示如下:
进入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
修复表的过程就不再写了,有兴趣的朋友们可以自己探索下。