We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,106 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Merging Two Tables in Different Servers to a Single Server

I have a database on both the servers with different table values and a
third server with the same named db and tables in MYSQL

server1-db1-table1

table1
ID Number
1 101
2 102
3 103

server2-db1-table1

table1

ID Number
4 201
5 202
6 303

How can I merge these two databases on a different server?
Like the desired result

server3-db1-table1

table1

ID Number
1 101
2 102
3 103
4 201
5 202
6 303

Thanks

2
Contributors
3
Replies
1 Hour
Discussion Span
6 Months Ago
Last Updated
4
Views
dharmendra1986
Newbie Poster
8 posts since Nov 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Are you looking for a tool? For a tool I'd use Navicat (paid), but there's also Toad and Heidi, or you could just dump the tables and import them again using the mysql command line tools.

pritaeas
Posting Prodigy
Moderator
9,293 posts since Jul 2006
Reputation Points: 1,178
Solved Threads: 1,462
Skill Endorsements: 86

Can something like this is doable

Insert Ignore INTO server3.db1.table1(select server1.db1.tbl1 union select server2.db1.tbl1)

dharmendra1986
Newbie Poster
8 posts since Nov 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

I don't think this will work over (physically) different servers.

pritaeas
Posting Prodigy
Moderator
9,293 posts since Jul 2006
Reputation Points: 1,178
Solved Threads: 1,462
Skill Endorsements: 86

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0778 seconds using 2.66MB