使用Java将数据从mysql数据库复制到其他mysql数据库 [英] copy data from a mysql database to other mysql database with java

查看:1178
本文介绍了使用Java将数据从mysql数据库复制到其他mysql数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开发了一个小型的swing桌面应用程序.这个应用程式需要其他资料库中的资料,因此我使用Java建立了一个小程序,可以从远端资料库中取得资讯(使用jdbc)并将其复制(使用jpa)到本地资料库,问题是过程需要很多时间.还有其他方法可以更快地完成此任务吗?

如果我不清楚,我不是母语人士,请通知我.

谢谢

迭戈

解决方案

一个不错的选择是在MySQL中使用复制功能.请参阅MySQL手册此处以获取更多信息.

I have developed a small swing desktop application. This app needs data from other database, so for that I've created an small process using java that allows to get the info (using jdbc) from remote db and copy (using jpa) it to the local database, the problem is that this process take a lot of time. is there other way to do it in order to make faster this task ?

Please let me know if I am not clear, I'm not a native speaker.

Thanks

Diego

解决方案

One good option is to use the Replication feature in MySQL. Please refer to the MySQL manual here for more information.

这篇关于使用Java将数据从mysql数据库复制到其他mysql数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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