MySQL 跨不同服务器上的数据库进行连接
因此,我有一个现有的数据库,其中包含一些针对一类用户的表。我们正在构建一个更通用的应用程序来处理公司所做的多项事情,而此类用户(称为主机)是我们公司中多个程序使用的通用类型。我们希望(最终)迁移到集中式应用程序,因为现在我们有几个。然而,我们现在没有时间完全做到这一点。我需要为这些主机构建一个登录系统,并且我想开始迁移到这个新系统。我无法找到一种合理的方法将旧数据库中的表移动到新数据库,新数据库(当然)驻留在不同的服务器上,而不想在 30 秒后刺伤自己的眼睛处理这个问题。旧数据库有许多报告依赖于当前主机表的连接。
我唯一能想到的似乎都不是很好的主意。这些是,从两个应用程序写入两个数据库(毫无意义的数据重复容易导致同步问题),从新应用程序提供一个API,并将返回的数据与记录集混合在一起(似乎......错误)。
有人知道如何处理这个问题吗?
So, I have an existing db with some tables for a class of users. We're building a more general app to handle multiple things the company does and this class of users, call them hosts, is a general type used by multiple programs in our company. We want to (eventually) migrate into a centralized app as now we have several. However, we don't have the time to do it completely right now. I need to build a login system for these hosts and I'd like to begin to migrate to this new system with that. I can't figure out a reasonable way to move those tables that are in the legacy DB to the new DB, which (of course) resides on a different server, with out wanting to stab my own eyes out after 30 seconds of having to deal with this. The legacy db has many reports the rely on joining on the current hosts tables.
The only things I can come up with don't seem like very good ideas. Those being, writing to both dbs from both apps (pointless data duplication prone to syncing problems), provide an API from the new app and mash the data coming back together with record sets (just seems... wrong).
Anyone have any ideas how to deal with this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它有其局限性,但是 FEDERATED 存储引擎可能会有所帮助。
It has it's limitations, but the FEDERATED storage engine might be of assistance.