Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello

Using MySQL, I have DB 1 with table T1 on Server 1 and DB 2 with table T1 on Server 2. Not on the same network and T1 contain the same columns with the same datatypes.

I want to create a trigger on DB 1 so when there is a insert on T1 on DB 1, all the data inserted in T1 is copied (or inserted) into T1 but the T1 that is on DB 2 on Server 2.



Guys Can u plz help me if it is possible
Posted
Updated 22-Jul-13 1:35am
v3

1 solution

Suggest following option, using the batch script, you need to export the data from T1/Server1 and import into T1/Server2

export and import can be done using mysqldump command.

Batch script can be executed using a cron job with the required frequency (daily / hourly etc)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900