Tuesday, September 4, 2007

Chained Replication MySQL

After an hour of banging my head trying to implement chain replication I found what I was missing on Kevin Minnick's blog.

To allow a slave to act as a master to another slave use the
log-slave-updates option in my.cnf, this along with the other standard settings for master-slave configuration i.e. log-bin=YOUR_BINARY_LOG (in your master my.cnf)

Monday, September 3, 2007

Search and replace string in multiple files

egrep -rl OLD_STRING * | xargs perl -pi -e "s/OLD_STRING/NEW_STRING/g;"