我有一个主服务器和各种从服务器。所有服务器上都有大量的数据,我希望为我们的数据创建一个存档系统。 [英] I have a master and various slave servers.there is a huge amount of the data on all the servers and I wish to create an archiving system for our data.

查看:83
本文介绍了我有一个主服务器和各种从服务器。所有服务器上都有大量的数据,我希望为我们的数据创建一个存档系统。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

场景是:我希望只有最后一年的数据在服务器上,所有其他以前的数据都要移动到存档。



数据库我正在使用是用于Windows平台的MySQL。



我尝试过:



我试图使用存储过程,但它无法正常工作。

Scenario is : I want that only Last one year data to be on the servers and all other previous data to be move to archived.

Database I am using is MySQL for Windows platform.

What I have tried:

I am trying to use a stored procedure but it is not working.

推荐答案

你的问题几乎是100%无法回答。您没有提供有关您的程序,数据库,您真正尝试做什么的任何信息。我们无法看到您的屏幕,您的计算机,连接到您的服务器或阅读您的想法。您需要提供比您拥有的更多信息。而但不工作绝对没有告诉我们。记住,答案总是在细节中,细节是你忘记的。



我会根据我的想法给你一个提示。使用与生产数据库完全相同的元数据创建数据库的存档版本。然后将生产数据库中的所有数据复制到存档,然后从生产中删除。
You're question is almost 100% unanswerable. You have not provided any information about your program, your db, what you are really attempting to do. We cannot see you screen, your computer, connect to your servers, or read your mind. You need to provide more information than what you have. And "but is not working" tells us absolutely nothing. Remember the answer always lays in the details, and the details are what you have forgotten.

I will give you a hint based on what I think you are attempting. Create an archive version of your db with the exact same meta data as your production db. Then copy all the data from you production db to the archive and then delete from production.


这篇关于我有一个主服务器和各种从服务器。所有服务器上都有大量的数据,我希望为我们的数据创建一个存档系统。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆