2

I'm setting up master/slave replication on a non-trivally-sized schema (around 3Gb of data) and I'm trying to work out the best way to go about it. I have a backup script working on the master that uses mysqlhotcopy to take a cope of the schema in question. I can identify the point at which this is taken in the binary logs. Do I need to go through the process of issuing the FLUSH WITH READ LOCK statement and querying for the master log coordinates before I take the backup? Or can I use the binary log coordinates I've identified from the logs themselves?

liquorvicar
  • 161
  • 1
  • 4

1 Answers1

1

Honestly, I think you'd be better off using the built-in mysql replication... rather than trying to re-invent the wheel. Is there some reason you don't want to make use of the built-in replication?

TheCompWiz
  • 7,409
  • 17
  • 23
  • Maybe my question wasn't quite clear enough. I am planning to use the built-in replication; it's just a question of getting the data and starting point to get the slave started. I'm wondering whether I need to carry out the instructions as per the MySQL site or whether my current backup procedure gives me what I need. – liquorvicar Dec 19 '11 at 17:02
  • You can use any method you prefer... just once you set up the "slave" make sure you set the current position on the slave properly. – TheCompWiz Dec 20 '11 at 18:48
  • http://dev.mysql.com/doc/refman/5.0/en/replication-howto-masterstatus.html and http://dev.mysql.com/doc/refman/5.0/en/replication-howto-slaveinit.html are very helpful on that. – TheCompWiz Dec 20 '11 at 18:48