开发者

How to transfer data automatically from one MySQL Database to another MySQL Database?

I have two MySQL Database which are in different machines. I want to transfer data from one Server to another automatically. Lets say, I want my data transfer t开发者_开发知识库o happen each day morning 4:00.

Can it be done? Is there any MySQL built in feature by which we can do it?

I want to transfer data from some specific tables not from the whole DB.


If you want automated solution handled by MySQL, then it's replication what you need. Since the topic is broad and covered in detail in MySQL manual, I suggest you sit down and read what the documentation says on the topic.


mysqldump -uuser -ppass your_db your_table1 > to_sql

and then use crontab run

mysql -uroot -ppass -hhost < to_sql

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜