本地内网应用程序(基于php构建)可以查询存储在异地位置的mysql数据库吗?
我有一个本地 Intranet 应用程序,它在我们办公室的基本 WAMP 服务器上运行。每天早上,我们的一名团队成员手动将内部 mysql 数据库与外部 mysql 数据库(在线注册发生的地方)同步。如果白天在 Intranet 应用程序上进行更改,则直到第二天才会反映在外部数据库上。
我想知道是否有可能(本质上)从我们办公室内的 wamp 或 xampp 服务器隧道到外部 mysql 连接并“实时”工作。
有人有任何运气或建议吗?
I have a local intranet application which runs off a basic WAMP server in our offices. Every morning, one of our team members manually syncs our internal mysql db with our external mysql db (where our online enrollments occur). If a change is made during the day on the intranet application, it is not reflected on the external db until the following day.
I am wondering if it is possible to (essentially) tunnel to an external mysql connection from say a wamp or xampp server from within our offices and work in 'real-time'.
Anybody had any luck or advice?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是
如果直接使用外部服务器,性能可能会受到影响。千兆位 LAN 可能比 Internet 连接快一千倍 - 特别是 ADSL 连接的上传速度。
Yes
If you use the external server directly, performance is likely to suffer. A Gigabit LAN might be a thousand times faster than your Internet connection - particularly the upload speed of an ADSL connection.
只需让您的内部应用程序使用外部应用程序的数据库即可。您可能需要向外部服务器添加权限以允许来自内部服务器 IP 的连接,但否则这就像拥有需要相互访问的网络服务器和独立的数据库服务器一样。
在这里不能真正告诉你如何做到这一点 - 这一切都取决于你的具体配置,我认为有些事情有点复杂(而且太专业),无法弄清楚。
Just make your internal application use the database from the external one. You may need to add permission to the external server to allow connections from your internal server IP, but otherwise this is just like having a webserver and sperate db server that need to access each other.
Can't really tell you how to do this here - it all depends on your specific configuration, something that I would thing is a little complicated (and too specialized) to figure out on SO.