1.11M Members

Merging Two Tables in Different Servers to a Single Server

 
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

 
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.

 
0
 

Can something like this is doable

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

 
0
 

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

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