Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有人能告诉我归档 MySQL 数据库信息的不同方式吗?我想保存我的数据库表以将其用作存档并将新信息存储在第一个数据库中这就像从我的数据库中获取备份一样。我想知道这样做的最佳方法。
做这个的最好方式是什么 ?
将所有数据保存在一个表中。 数据库旨在存储数据。比您想象的还要多的数据。
只需date在表格中添加字段,您就可以按月过滤掉您的记录——您只需要为此学习一点 SQL。
date
我会设置一个cron作业来定期将信息复制到存档表,然后在工作表上执行删除。除此之外,它的所有应用程序/要求都是特定的,您还没有提供足够的信息来了解更多细节。
cron