I noticed a problem on RedHat and Fedora with the following command:
date = `date +%Y%m%d`
It should read:
date=`date +%Y%m%d`
Having a space on either side of the '=' gives an error and doesn't give the desired effect.
This page has helped me a great deal. I read all the documentation re: replication on the MySQL website, and still had some questions on how to perform this very task. This is a real nice script given how simple and effective it is.
I think the coolest find in here for me was the mysqldump --master-data option when setting up the slave. I will also use this regularly when I backup the slave, that way if the master goes down and I need to reverse roles on the master and slave, having that option set should help get things back up to speed on the master a bit quicker. At least I hope!
|