Wednesday, August 16, 2006

My new MySQL playground

The VMWare Server allows to do great things that you usually wouldn't like to do on your working machines, mostly because of the danger to damage something that can take a lot of time to recover. And it's also a great thing to play with advanced MySQL issues.

So I installed myself a "MySQL playground" - a VMWare machine running SuSE Linux 10.1 - and installed three MySQL 5.1.11 servers (placed in different directories and assigned the ports 3306, 3307 and 3308). The first thing that I played with was to set up a multimaster replication example, based on Giuseppe Maxia's article: Advanced MySQL Replication Techniques (I planned to do this for quite a while and now I finally did it!).

Giuseppe's article is great and makes this a very straight-forward task. The only thing I'd like to mention (because I overlooked it and lost a bit of time) is that if you run more than two servers, you absolutely need to add the log-slave-updates option to the [mysqld] section of your my.cnf files. Otherwise your actions will be replicated only to the next slave, but since this one wouldn't write these actions to the binlog, it would not be replicated to the other servers as well.

Just try it out - get yourself a virtual machine, install a few MySQL instances and play around with them. This can be a lot of fun and of course very instructive!

I'm not sure whether there are any legal issues distributing VMWare machines (I don't think so, but the VMWare server is proprietary software so I'm not completely sure)? If there aren't any I would be happy to offer my playground for download.

1 comment:

braden.crisp@gmail.com said...

Thanks -- I have saved the URL of this blog post in my text file under "UDF" for future reference. I just clicked over from another site and figured I should take a look around. Like what I see so now I'm following you. Look forward to checking out your some of your posts again.