找回密码
 立即注册

QQ登录

只需一步,快速开始

Discuz!遭遇到恶意注册批量删除方案之一


一般注册机与灌水机都是批量的注册账户并灌水发帖
因此注册的uid一般是连续的
可以通过uid来批量删除用户及相关数据
比如大于某uid的批量删除的sql
  1. set @delid = 1000000;
  2. delete from pre_home_feed where uid > @delid;
  3. delete from pre_home_share where uid > @delid;
  4. delete from pre_home_comment where uid > @delid;
  5. delete from pre_home_blogfield where uid > @delid;
  6. delete from pre_home_blog where uid > @delid;
  7. delete from pre_home_class where uid > @delid;
  8. delete from pre_home_pic where uid > @delid;
  9. delete from pre_common_member where uid > @delid;
  10. delete from pre_common_member_count where uid > @delid;
  11. delete from pre_common_member_field_forum where uid > @delid;
  12. delete from pre_common_member_field_home where uid > @delid;
  13. delete from pre_home_album where uid > @delid;
  14. delete from pre_home_docomment where uid > @delid;
  15. delete from pre_home_doing where uid > @delid;
  16. delete from pre_home_notification where authorid > @delid;
  17. delete from pre_forum_post where authorid > @delid;
  18. delete from pre_forum_thread where authorid > @delid;
  19. delete from pre_portal_comment where uid > @delid;
  20. delete from pre_common_member_profile where uid > @delid;
  21. delete from pre_common_member_status where uid > @delid;
  22. delete from pre_ucenter_members where uid > @delid;
复制代码


以上句子在后台---站长---数据库---升级 运行
或上phpmyadmin运行下
其中
  1. set @delid = 1000000;
复制代码


是定义uid=1000000
大于该uid的用户和关联数据全部删除
可以根据自己站点实际情况定义该值
其中的语句可以单独拆分进行处理

本教程由无限星辰工作室CRX349独家整理和提供,转载请注明地址,谢谢。本文地址:https://xmspace.net/thread-302-1-1.html
无限星辰工作室  好集导航 Discuz全集下载  星辰站长网  集热爱361  一品文学  手机小游戏合集   海外空间网 星辰api  星辰支付二维码管理平台 LOT智能硬件聚合平台 阿里云服务器 腾讯云服务器
服务Discuz!建站|DiscuzQ配置|二开|小程序|APP|搬家|挂马清理|防护|Win/Linux环境搭建|优化|运维|
服务理念:专业 诚信 友好QQ842062626 服务项目 Q群315524225

发表于 2015-2-5 15:29:56 | 显示全部楼层 |阅读模式

回复 | 使用道具 举报

该帖共收到 0 条回复!
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

美图秀

    • 自建远程桌面服务器 rustdesk
    • Discuz!x3.4 账号保镖 自动冻结账号无效解
    • PVE换主板后 网络丢失解决方法
    • Kvm 虚拟机迁移到PVE里面
    • Discuz!x3,4 阿里云DCDN配置获取客户端ip
拖动客服框
Online Service
点击这里给我发消息
点击这里联系我们
微信扫一扫
在线客服
快速回复 返回顶部 返回列表