Hi this is Ravindra and i have one question that i want to copy table data from one database server to another pc database server periodically after 7 or 10 days automatically in linux through cron job Can Any one help me out plz
1 Answer
First of all you want to set up Master Slave Replication in MySQL. All steps are clearly explained in this site.
Next, you need to create a shell scripts that contains mysql connection and the commands to start/stop replication.
STOP SLAVE;
START SLAVE;
Last, you need to set up a cron job to run the shell scripts similar to this.
# Minute Hour Day of Month Month Day of Week Command
# (0-59) (0-23) (1-31) (1-12) (0-6)
0 0 * * 1 sh shell_script.sh