Discuz数据库security_failedlog错误及修复
最近跑了之前的论坛转了转,发现一直在报数据库中表security_failedlog错误,百度了好久,最终找到解决方案。
何为pre_security_failedlog:
pre_security_failedlog:防水墙失败日志记录。
问题现象
[caption id=“” align=“alignnone” width=“497”] 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()[/caption]
解决方案
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
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
修复表的过程就不再写了,有兴趣的朋友们可以自己探索下。
除特别注明外,本站所有文章均为 Windcoder网 原创,转载请注明出处来自: discuz-shu-ju-ku-security_failedlog-cuo-wu-ji-xiu-fu

谢谢,照着博主的方法 成功解决了 用discuz tools 都修不好,楼主的删了重建妥妥的
回复 @感谢楼主: 很高兴能帮助您
我来说点什么吧!。。。。。这里省略一万字
回复 @互传站长网: 饿。。。。对你的评论我也说点什么吧。。。这里省略零点一个字
偶看不明,学不来,……
回复 @aZ: 难道是我表达能力太差→_→
学习了。
回复 @屠龙: 嘻嘻
妻子:“我听说男人秃顶是因为用脑过度,是这样吗?”丈夫:“是呀!你们女人整天喋喋不休,用嘴过度,所以也都不长胡子。”www.99shuobo.com 悟空网赚来访,欢迎互访
回复 @悟空网赚: 哈哈,好冷的笑话,忽然发现网站好难打开饿
每次网站都记录修改的东西,不错,这习惯很好
回复 @珠海宣传片制作: O(∩_∩)O谢谢
看了解决方法好像也挺简单的,就好比我们平时那些软件问题,直接卸载再重装,博主很给力啊
回复 @boke123: 恩,谢谢,其实直接修复更简单些,只是看到网上有些人表示修复了有可能反复,我就直接重建了。。。。
Discuz数据库,表示我还没有接触过!
回复 @免费部落: 还是不要有这种机会的好
回复 @蜜汁炒酸奶: 下次有机会试试!
回复 @免费部落: 都差不多的,只是DZ的表多了点
我也遇到过,先直接修复表,然后优化。视情况删除多余的数据库表。DZ太强大,数据库看的头晕。
回复 @灰常记忆: 恩,主要还是他的表太多了
不错不错,嘿嘿,帮你点点广告
回复 @一昕精选: O(∩_∩)O谢谢