Coming up with a unique MySQL server-id

The server-id, is used in replication to give each master and slave a unique identity. For each server participating in replication, you should pick a positive integer in the range from 1 to 2^32 – 1 to act as that server’s ID. To come up with this id convert the IP address of the server to an integer as follows

IP address 10.8.208.31

First Octet: 10
Second Octet: 8
Third Octet: 208
Fourth Octet: 31

(first octet * 256^3) + (second octet * 256^2) + (third octet * 256) + (fourth octet)
server-id = (10 * 16777216) + (8 * 65536) + (208 * 256) + (31)
server-id = 168349727

Slacking off

Well I haven’t really wrote anything in the last couple of months even though, I have had plenty to write about. I went to OSCON 2010 in July and had a great time. I learned more about MongoDB and picked up a few more bits of information on MySQL, Memcached, and Linux.

In July I went to Novell’s Linux Days. I have to admit that Novell has some nice products. Not sure if I would personally pay for them, but if the company wanted to, I wouldn’t turn my nose up at them.

MySQL Workbench..

The MySQL Workbench has been out for a little while now, and I kind of put it to the back of my mind, because when it come out it was on Windows only. I, myself use Linux about 90% of the time, so I figured I would wait until they had a Linux version. The other day I was surfing MySQL website and noticed that they have a Linux, and OS X version now. So I figured I would give it a try.

I have use the MySQL GUI tools before and while they are great for simplifying administration and have a lot of basic functionality, they are lacking in the design and development areas. Now enters MySQL Workbench. It’s a data modeling and design tool. To quote the MySQL website.

“MySQL Workbench enables a DBA, developer, or data architect to visually design, generate, and manage all types of databases including Web, OLTP, and data warehouse databases. It includes everything a data modeler needs for creating complex ER models, and also delivers key features for performing difficult change management and documentation tasks that normally require much time and effort” 

All in all it’s not a bad tool. It’s easy to use and fills a hole in the MySQL toolkit. Of course there are two version of it Community and Standard, of which the standard has $99 a year subscription and has additional plugins.

Check it out: http://www.mysql.com/products/workbench/