johnnyasterisk
IS-IT--Management
I have 2 servers:
1.1.1.1 and 1.1.1.2 both running mysql
1.1.1.1 has a table called table1
1.1.1.2 has a table called table2
Both of these tables are the exact same structure. I need to know how to do the following:
on table2 select the max(id) then use that value to:
insert into table2 the records that have an id of > max(id) of table2
I need this to run every 15 mins so dont want to have to worry about exporting to a file and importing.
This is basically a replication script that will copy any uncopied data from server1.table1 to server2.table2
Thanks in advance for any input.
The JA
1.1.1.1 and 1.1.1.2 both running mysql
1.1.1.1 has a table called table1
1.1.1.2 has a table called table2
Both of these tables are the exact same structure. I need to know how to do the following:
on table2 select the max(id) then use that value to:
insert into table2 the records that have an id of > max(id) of table2
I need this to run every 15 mins so dont want to have to worry about exporting to a file and importing.
This is basically a replication script that will copy any uncopied data from server1.table1 to server2.table2
Thanks in advance for any input.
The JA