找回密码
 立即注册→加入我们

QQ登录

只需一步,快速开始

搜索
热搜: 下载 VB C 实现 编写
查看: 3035|回复: 1

【论坛站务】论坛登录异常问题已经修复了(大概

[复制链接]
发表于 2018-11-4 21:48:03 | 显示全部楼层 |阅读模式

欢迎访问技术宅的结界,请注册或者登录吧。

您需要 登录 才可以下载或查看,没有账号?立即注册→加入我们

×
    论坛之前有登录异常问题,是因为Discuz! X3.2的存档表用户无法登录所致。这种事情虽然以前出现过一次并且我手动合并了一次存档表,但还是再次出现了。
    现在发现是“每日用户表优化”(cron_member_optimize_daily.php)会定期把长期不登录的用户移动到存档表里。为了解决这个问题,我禁用了这个计划任务。现在所有的用户都在主表里,不会出现无法登录的问题了。
    欢迎大家访问技术宅的结界,并且进行后续维护的协助,告知我有关登录问题的状况。谢谢配合。

技术宅的结界管理组 2018-11-4
回复

使用道具 举报

 楼主| 发表于 2018-11-4 21:54:44 | 显示全部楼层
有关存档表合并的SQL语句如下,使用时请注意先备份数据库。
  1. # pre_common_member

  2. drop table if exists pre_common_member_bak;
  3. drop table if exists pre_common_member_temp;
  4. drop table if exists pre_common_member_archive_bak;

  5. # 备份表
  6. create table pre_common_member_temp like pre_common_member;
  7. insert into pre_common_member_temp select * from pre_common_member;
  8. create table pre_common_member_archive_bak like pre_common_member_archive;
  9. insert into pre_common_member_archive_bak select * from pre_common_member_archive;

  10. insert ignore into pre_common_member_temp select * from pre_common_member_archive;
  11. insert ignore into pre_common_member_temp select * from pre_common_member;

  12. # 主表改成bak备份,临表二改成主表名,清空存档表的数据
  13. alter table pre_common_member RENAME TO pre_common_member_bak;
  14. alter table pre_common_member_temp RENAME TO pre_common_member;
  15. truncate table pre_common_member_archive;

  16. # pre_common_member_count

  17. drop table if exists pre_common_member_count_bak;
  18. drop table if exists pre_common_member_count_temp;
  19. drop table if exists pre_common_member_count_archive_bak;

  20. # 备份表
  21. create table pre_common_member_count_temp like pre_common_member_count;
  22. insert into pre_common_member_count_temp select * from pre_common_member_count;
  23. create table pre_common_member_count_archive_bak like pre_common_member_count_archive;
  24. insert into pre_common_member_count_archive_bak select * from pre_common_member_count_archive;

  25. insert ignore into pre_common_member_count_temp select * from pre_common_member_count_archive;
  26. insert ignore into pre_common_member_count_temp select * from pre_common_member_count;

  27. # 主表改成bak备份,临表二改成主表名,清空存档表的数据
  28. alter table pre_common_member_count RENAME TO pre_common_member_count_bak;
  29. alter table pre_common_member_count_temp RENAME TO pre_common_member_count;
  30. truncate table pre_common_member_count_archive;

  31. # pre_common_member_field_home

  32. drop table if exists pre_common_member_field_home_bak;
  33. drop table if exists pre_common_member_field_home_temp;
  34. drop table if exists pre_common_member_field_home_archive_bak;

  35. # 备份表
  36. create table pre_common_member_field_home_temp like pre_common_member_field_home;
  37. insert into pre_common_member_field_home_temp select * from pre_common_member_field_home;
  38. create table pre_common_member_field_home_archive_bak like pre_common_member_field_home_archive;
  39. insert into pre_common_member_field_home_archive_bak select * from pre_common_member_field_home_archive;

  40. insert ignore into pre_common_member_field_home_temp select * from pre_common_member_field_home_archive;
  41. insert ignore into pre_common_member_field_home_temp select * from pre_common_member_field_home;

  42. # 主表改成bak备份,临表二改成主表名,清空存档表的数据
  43. alter table pre_common_member_field_home RENAME TO pre_common_member_field_home_bak;
  44. alter table pre_common_member_field_home_temp RENAME TO pre_common_member_field_home;
  45. truncate table pre_common_member_field_home_archive;

  46. # pre_common_member_field_forum

  47. drop table if exists pre_common_member_field_forum_bak;
  48. drop table if exists pre_common_member_field_forum_temp;
  49. drop table if exists pre_common_member_field_forum_archive_bak;

  50. # 备份表
  51. create table pre_common_member_field_forum_temp like pre_common_member_field_forum;
  52. insert into pre_common_member_field_forum_temp select * from pre_common_member_field_forum;
  53. create table pre_common_member_field_forum_archive_bak like pre_common_member_field_forum_archive;
  54. insert into pre_common_member_field_forum_archive_bak select * from pre_common_member_field_forum_archive;

  55. insert ignore into pre_common_member_field_forum_temp select * from pre_common_member_field_forum_archive;
  56. insert ignore into pre_common_member_field_forum_temp select * from pre_common_member_field_forum;

  57. # 主表改成bak备份,临表二改成主表名,清空存档表的数据
  58. alter table pre_common_member_field_forum RENAME TO pre_common_member_field_forum_bak;
  59. alter table pre_common_member_field_forum_temp RENAME TO pre_common_member_field_forum;
  60. truncate table pre_common_member_field_forum_archive;

  61. # pre_common_member_profile

  62. drop table if exists pre_common_member_profile_bak;
  63. drop table if exists pre_common_member_profile_temp;
  64. drop table if exists pre_common_member_profile_archive_bak;

  65. # 备份表
  66. create table pre_common_member_profile_temp like pre_common_member_profile;
  67. insert into pre_common_member_profile_temp select * from pre_common_member_profile;
  68. create table pre_common_member_profile_archive_bak like pre_common_member_profile_archive;
  69. insert into pre_common_member_profile_archive_bak select * from pre_common_member_profile_archive;

  70. insert ignore into pre_common_member_profile_temp select * from pre_common_member_profile_archive;
  71. insert ignore into pre_common_member_profile_temp select * from pre_common_member_profile;

  72. # 主表改成bak备份,临表二改成主表名,清空存档表的数据
  73. alter table pre_common_member_profile RENAME TO pre_common_member_profile_bak;
  74. alter table pre_common_member_profile_temp RENAME TO pre_common_member_profile;
  75. truncate table pre_common_member_profile_archive;

  76. # pre_common_member_status

  77. drop table if exists pre_common_member_status_bak;
  78. drop table if exists pre_common_member_status_temp;
  79. drop table if exists pre_common_member_status_archive_bak;

  80. # 备份表
  81. create table pre_common_member_status_temp like pre_common_member_status;
  82. insert into pre_common_member_status_temp select * from pre_common_member_status;
  83. create table pre_common_member_status_archive_bak like pre_common_member_status_archive;
  84. insert into pre_common_member_status_archive_bak select * from pre_common_member_status_archive;

  85. insert ignore into pre_common_member_status_temp select * from pre_common_member_status_archive;
  86. insert ignore into pre_common_member_status_temp select * from pre_common_member_status;

  87. # 主表改成bak备份,临表二改成主表名,清空存档表的数据
  88. alter table pre_common_member_status RENAME TO pre_common_member_status_bak;
  89. alter table pre_common_member_status_temp RENAME TO pre_common_member_status;
  90. truncate table pre_common_member_status_archive;

  91. # pre_home_follow_feed

  92. drop table if exists pre_home_follow_feed_bak;
  93. drop table if exists pre_home_follow_feed_temp;
  94. drop table if exists pre_home_follow_feed_archiver_bak;

  95. # 备份表
  96. create table pre_home_follow_feed_temp like pre_home_follow_feed;
  97. insert into pre_home_follow_feed_temp select * from pre_home_follow_feed;
  98. create table pre_home_follow_feed_archiver_bak like pre_home_follow_feed_archiver;
  99. insert into pre_home_follow_feed_archiver_bak select * from pre_home_follow_feed_archiver;

  100. insert ignore into pre_home_follow_feed_temp select * from pre_home_follow_feed_archiver;
  101. insert ignore into pre_home_follow_feed_temp select * from pre_home_follow_feed;

  102. # 主表改成bak备份,临表二改成主表名,清空存档表的数据
  103. alter table pre_home_follow_feed RENAME TO pre_home_follow_feed_bak;
  104. alter table pre_home_follow_feed_temp RENAME TO pre_home_follow_feed;
  105. truncate table pre_home_follow_feed_archiver;

  106. # 如果不想保留备份,则执行这里的语句删除备份
  107. drop table if exists pre_common_member_bak;
  108. drop table if exists pre_common_member_temp;
  109. drop table if exists pre_common_member_archive_bak;
  110. drop table if exists pre_common_member_count_bak;
  111. drop table if exists pre_common_member_count_temp;
  112. drop table if exists pre_common_member_count_archive_bak;
  113. drop table if exists pre_common_member_field_home_bak;
  114. drop table if exists pre_common_member_field_home_temp;
  115. drop table if exists pre_common_member_field_home_archive_bak;
  116. drop table if exists pre_common_member_field_forum_bak;
  117. drop table if exists pre_common_member_field_forum_temp;
  118. drop table if exists pre_common_member_field_forum_archive_bak;
  119. drop table if exists pre_common_member_profile_bak;
  120. drop table if exists pre_common_member_profile_temp;
  121. drop table if exists pre_common_member_profile_archive_bak;
  122. drop table if exists pre_common_member_status_bak;
  123. drop table if exists pre_common_member_status_temp;
  124. drop table if exists pre_common_member_status_archive_bak;
  125. drop table if exists pre_home_follow_feed_bak;
  126. drop table if exists pre_home_follow_feed_temp;
  127. drop table if exists pre_home_follow_feed_archiver_bak;
复制代码
回复 赞! 靠!

使用道具 举报

本版积分规则

QQ|Archiver|小黑屋|技术宅的结界 ( 滇ICP备16008837号 )|网站地图

GMT+8, 2024-12-14 08:09 , Processed in 0.029515 second(s), 21 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表