On 8/15/2011 09:06, wrote:
2011/08/10 08:16 +0200, Johan De Meersman>>>>
Yes, the MySQL binary log can be read (and thus, re-executed) by the
mysqlbinlog utility.
<<<<<<<<
Yes, but what is the best means of picking up the changes from the instance where there were
changes to the instance that is a copy? Is it best to copy the log and that so use
"msqlbinlog"? Or is it better so to use "msqlbinlog" that it makes SQL
statements that I copy to the other instance?
No TCP/IP here, only a flash drive.
If you are going to pretend to be the MySQL replication system, it
wouldn't hurt you to understand the process before you start. First,
read the replication chapter in the manual. It will describe the theory
behind replication.
Next, you need to realize that you will be replacing both the SLAVE IO
thread and the SLAVE SQL thread with your process.
The SLAVE IO thread you replace when you get the statements the slave
needs to replicate onto the flashdrive. You can do that two different ways:
1) extract the statements from the binary log.
2) get the master to sent you the statements just as if you were a slave.
mysqlbinlog will do either - (again, read the manual on how to use the
tool)
Once you have collected the statements you need the slave to apply (and
put them on your flash drive), now it's your turn to replay those
statements on the slave. The easiest tool for that will probably be the
mysql client (a command-line tool). This is where you become the SLAVE
SQL thread.
Beyond that, all you really need to keep up with is the binary log
position you replicated last (again, pretending to be the SLAVE IO thread).
Best of luck! what you are doing is definitely labor intensive.
Regards,
--
Shawn Green
MySQL Principal Technical Support Engineer
Oracle USA, Inc. - Hardware and Software, Engineered to Work Together.
Office: Blountville, TN
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=arch...@jab.org