title: Perl: How to copy/mirror remote MYSQL table(s) to another database? Possibly different structure too?
body: <p>I am very new to this and a good friend is in a bind. I am at my wits end. I have used gui's like navicat and sqlyog to do this but, only manually.</p>
  
  <p>His band info data (schedules and whatnot) is in a MYSQL database on a server (admin server).</p>
  
  <p>I am putting together a basic site for him written in Perl that grabs data from a database that resides on my server (public server) and displays schedule info, previous gig newsletters and some fan interaction.</p>
  
  <p>He uses an administrative interface, which he likes and desires to keep, to manage the data on the admin server.</p>
  
  <p>The admin server db has a bunch of tables and even table data the public db does not need.</p>
  
  <p>So, I created tables on the public side that only contain relevant data.</p>
  
  <p>I basically used a gui to export the data, then insert to the public side whenever he made updates to the admin db (copy and paste).</p>
  
  <p>(FYI I am using DBI module to access the data in/via my public db perl script.)</p>
  
  <p>I could access the admin server directly to grab only the data I need but, the whole purpose of this is to "mirror" the data not access the admin server on every query. Also, some tables are THOUSANDS of rows and parsing every row in a loop seemed too "bulky" to me. There is however a "time" column which could be utilized to compare to.</p>
  
  <p>I cannot "sync" due to the fact that the structures are different, I only need the relevant table data from only three tables.</p>
  
  <p>SO...... I desire to automate! </p>
  
  <p>I read "copy" was a fast way but, my findings in how to implement were too advanced for my level.</p>
  
  <p>I do not have the luxury of placing a script on the admin server to notify when there was an update.</p>
  
  <p>1- I would like to set up a script to check a table to see if a row was updated or added on the admin servers db.
  I would then desire to update or insert the new or changed data to the public servers db.</p>
  
  <p>This "check" could be set up in a cron job I guess or triggered when a specific page loads on the public side. (the same sub routine called by the cron I would assume).</p>
  
  <p>This data does not need to be "real time" but, if he updates something it would be nice to have it appear as quickly as possible.</p>
  
  <p>I have done much reading, module research and experimenting but, here I am again at stackoverflow where I always get great advice and examples.</p>
  
  <p>Much of the terminology is still quite over my head so verbose examples with explanations really help me learn quicker.</p>
  
  <p>Thanks in advance.</p>