1,105,644 Community Members

Merging Two Tables in Different Servers to a Single Server

Member Avatar
dharmendra1986
Newbie Poster
8 posts since Nov 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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

Member Avatar
pritaeas
mod_pritaeas
11,315 posts since Jul 2006
Reputation Points: 1,420 [?]
Q&As Helped to Solve: 1,835 [?]
Skill Endorsements: 156 [?]
Moderator
Featured
Sponsor
 
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.

Member Avatar
dharmendra1986
Newbie Poster
8 posts since Nov 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Can something like this is doable

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

Member Avatar
pritaeas
mod_pritaeas
11,315 posts since Jul 2006
Reputation Points: 1,420 [?]
Q&As Helped to Solve: 1,835 [?]
Skill Endorsements: 156 [?]
Moderator
Featured
Sponsor
 
0
 

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

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: