技术宅的结界

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

QQ登录

只需一步,快速开始

搜索
热搜: 下载 VB C 实现 编写
查看: 67|回复: 1
收起左侧

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

[复制链接]

1007

主题

2232

帖子

5万

积分

用户组: 管理员

一只技术宅

UID
1
精华
199
威望
263 点
宅币
16684 个
贡献
33359 次
宅之契约
0 份
在线时间
1595 小时
注册时间
2014-1-26
发表于 2018-11-4 21:48:03 | 显示全部楼层 |阅读模式

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

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

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

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

1007

主题

2232

帖子

5万

积分

用户组: 管理员

一只技术宅

UID
1
精华
199
威望
263 点
宅币
16684 个
贡献
33359 次
宅之契约
0 份
在线时间
1595 小时
注册时间
2014-1-26
 楼主| 发表于 2018-11-4 21:54:44 | 显示全部楼层
有关存档表合并的SQL语句如下,使用时请注意先备份数据库。
[SQL] 纯文本查看 复制代码
# pre_common_member

drop table if exists pre_common_member_bak;
drop table if exists pre_common_member_temp;
drop table if exists pre_common_member_archive_bak;

# 备份表
create table pre_common_member_temp like pre_common_member;
insert into pre_common_member_temp select * from pre_common_member;
create table pre_common_member_archive_bak like pre_common_member_archive;
insert into pre_common_member_archive_bak select * from pre_common_member_archive;

insert ignore into pre_common_member_temp select * from pre_common_member_archive;
insert ignore into pre_common_member_temp select * from pre_common_member;

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

# pre_common_member_count

drop table if exists pre_common_member_count_bak;
drop table if exists pre_common_member_count_temp;
drop table if exists pre_common_member_count_archive_bak;

# 备份表
create table pre_common_member_count_temp like pre_common_member_count;
insert into pre_common_member_count_temp select * from pre_common_member_count;
create table pre_common_member_count_archive_bak like pre_common_member_count_archive;
insert into pre_common_member_count_archive_bak select * from pre_common_member_count_archive;

insert ignore into pre_common_member_count_temp select * from pre_common_member_count_archive;
insert ignore into pre_common_member_count_temp select * from pre_common_member_count;

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

# pre_common_member_field_home

drop table if exists pre_common_member_field_home_bak;
drop table if exists pre_common_member_field_home_temp;
drop table if exists pre_common_member_field_home_archive_bak;

# 备份表
create table pre_common_member_field_home_temp like pre_common_member_field_home;
insert into pre_common_member_field_home_temp select * from pre_common_member_field_home;
create table pre_common_member_field_home_archive_bak like pre_common_member_field_home_archive;
insert into pre_common_member_field_home_archive_bak select * from pre_common_member_field_home_archive;

insert ignore into pre_common_member_field_home_temp select * from pre_common_member_field_home_archive;
insert ignore into pre_common_member_field_home_temp select * from pre_common_member_field_home;

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

# pre_common_member_field_forum

drop table if exists pre_common_member_field_forum_bak;
drop table if exists pre_common_member_field_forum_temp;
drop table if exists pre_common_member_field_forum_archive_bak;

# 备份表
create table pre_common_member_field_forum_temp like pre_common_member_field_forum;
insert into pre_common_member_field_forum_temp select * from pre_common_member_field_forum;
create table pre_common_member_field_forum_archive_bak like pre_common_member_field_forum_archive;
insert into pre_common_member_field_forum_archive_bak select * from pre_common_member_field_forum_archive;

insert ignore into pre_common_member_field_forum_temp select * from pre_common_member_field_forum_archive;
insert ignore into pre_common_member_field_forum_temp select * from pre_common_member_field_forum;

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

# pre_common_member_profile

drop table if exists pre_common_member_profile_bak;
drop table if exists pre_common_member_profile_temp;
drop table if exists pre_common_member_profile_archive_bak;

# 备份表
create table pre_common_member_profile_temp like pre_common_member_profile;
insert into pre_common_member_profile_temp select * from pre_common_member_profile;
create table pre_common_member_profile_archive_bak like pre_common_member_profile_archive;
insert into pre_common_member_profile_archive_bak select * from pre_common_member_profile_archive;

insert ignore into pre_common_member_profile_temp select * from pre_common_member_profile_archive;
insert ignore into pre_common_member_profile_temp select * from pre_common_member_profile;

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

# pre_common_member_status

drop table if exists pre_common_member_status_bak;
drop table if exists pre_common_member_status_temp;
drop table if exists pre_common_member_status_archive_bak;

# 备份表
create table pre_common_member_status_temp like pre_common_member_status;
insert into pre_common_member_status_temp select * from pre_common_member_status;
create table pre_common_member_status_archive_bak like pre_common_member_status_archive;
insert into pre_common_member_status_archive_bak select * from pre_common_member_status_archive;

insert ignore into pre_common_member_status_temp select * from pre_common_member_status_archive;
insert ignore into pre_common_member_status_temp select * from pre_common_member_status;

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

# pre_home_follow_feed

drop table if exists pre_home_follow_feed_bak;
drop table if exists pre_home_follow_feed_temp;
drop table if exists pre_home_follow_feed_archiver_bak;

# 备份表
create table pre_home_follow_feed_temp like pre_home_follow_feed;
insert into pre_home_follow_feed_temp select * from pre_home_follow_feed;
create table pre_home_follow_feed_archiver_bak like pre_home_follow_feed_archiver;
insert into pre_home_follow_feed_archiver_bak select * from pre_home_follow_feed_archiver;

insert ignore into pre_home_follow_feed_temp select * from pre_home_follow_feed_archiver;
insert ignore into pre_home_follow_feed_temp select * from pre_home_follow_feed;

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

# 如果不想保留备份,则执行这里的语句删除备份
drop table if exists pre_common_member_bak;
drop table if exists pre_common_member_temp;
drop table if exists pre_common_member_archive_bak;
drop table if exists pre_common_member_count_bak;
drop table if exists pre_common_member_count_temp;
drop table if exists pre_common_member_count_archive_bak;
drop table if exists pre_common_member_field_home_bak;
drop table if exists pre_common_member_field_home_temp;
drop table if exists pre_common_member_field_home_archive_bak;
drop table if exists pre_common_member_field_forum_bak;
drop table if exists pre_common_member_field_forum_temp;
drop table if exists pre_common_member_field_forum_archive_bak;
drop table if exists pre_common_member_profile_bak;
drop table if exists pre_common_member_profile_temp;
drop table if exists pre_common_member_profile_archive_bak;
drop table if exists pre_common_member_status_bak;
drop table if exists pre_common_member_status_temp;
drop table if exists pre_common_member_status_archive_bak;
drop table if exists pre_home_follow_feed_bak;
drop table if exists pre_home_follow_feed_temp;
drop table if exists pre_home_follow_feed_archiver_bak;

本版积分规则

QQ|申请友链|Archiver|手机版|小黑屋|技术宅的结界 ( 滇ICP备16008837号|网站地图

GMT+8, 2018-11-20 13:42 , Processed in 0.079476 second(s), 11 queries , Gzip On, Memcache On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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