Weblog entry #6 for blackm
#6
mysql replication working
Posted by blackm on Sat 1 Oct 2005 at 12:40
A few month ago, a user donated a server to us. The box died a few week ago (filesystem corruption after power failure...it was reiserfs).
We reinstalled Sarge on a ext3 filesystem using the rescue system and debootstrap. And last nigth I got the mysql replication working. Once you understand the principle it is quit easy to set up. It is explained in detail on the mysql homepage. I also found a german tutorial on tecchannel.de
You can summarize it in a few easy steps:
We reinstalled Sarge on a ext3 filesystem using the rescue system and debootstrap. And last nigth I got the mysql replication working. Once you understand the principle it is quit easy to set up. It is explained in detail on the mysql homepage. I also found a german tutorial on tecchannel.de
You can summarize it in a few easy steps:
- give the master and the slave a different ID
- enable bin-log on the master
- put master in a read-only mode and mysqldump all databases; note log_file and position
- put master back in read-write mode
- copy dumped data to salve and load it into the database
- set MASTER Date on slave (host, username, password, log_file and position) and start salve;