Let's say I have two databases 'db1' & 'db2' on different mysql servers 'A' & 'B' respectively.
I want to check every 6 hours if there is any update found in 'table1' in 'db2', then the 'table1' in 'db1' will be automatically updated.
How can I do that with trigger or a cron job? and when it will be fired?
解决方案
You could do with with a cron job, simply could run a php file every minute.
this file can check for a new row in a table1 in db2 (saving current count of rows in a text file for comparison, and if new count > old count, then this can then update table1 in db1.
easy
but mysql replication as @Charles said in the comment would be better.