前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Discuz数据库security_failedlog错误及修复

Discuz数据库security_failedlog错误及修复

作者头像
WindCoder
发布2018-09-19 18:14:16
2.6K0
发布2018-09-19 18:14:16
举报
文章被收录于专栏:WindCoderWindCoder

最近跑了之前的论坛转了转,发现一直在报数据库中表security_failedlog错误,百度了好久,最终找到解决方案。

何为pre_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()

解决方案

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

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

2.修复或重建security_failedlog表

进入mysql数据库

删除表pre_security_failedlog:

代码语言:javascript
复制
DROP TABLE  pre_security_failedlog;

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

代码语言:javascript
复制
DROP TABLE IF EXISTS pre_security_failedlog;

重建表

代码语言:javascript
复制
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

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

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2014-08-20,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 何为pre_security_failedlog:
  • 问题现象
  • 解决方案
    • 1.直接关闭防水墙(治标不治本)
      • 2.修复或重建security_failedlog表
      相关产品与服务
      云数据库 SQL Server
      腾讯云数据库 SQL Server (TencentDB for SQL Server)是业界最常用的商用数据库之一,对基于 Windows 架构的应用程序具有完美的支持。TencentDB for SQL Server 拥有微软正版授权,可持续为用户提供最新的功能,避免未授权使用软件的风险。具有即开即用、稳定可靠、安全运行、弹性扩缩等特点。
      领券
      问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档