Howto Setup MySql Cluster on FreeBSD : Quick Guide

August 20, 2008 – 6:33 am
MySql Cluster is a technology that provides a shared-nothing clustering capabilities for the MySql Database Management System. The shared-nothing architecture allows the system to work with very minimum software and hardware requirements.This is my first attempt to make the MySql Cluster running on my FreeBSD machines.Each host is an Intel-based desktop PC, running a generic FreeBSD 7.0 installed to disk in a standard configuration.Filesystems on all hosts are set up identically.The MySQL version I use in this setup is 5.0.45.As this is just my experiment to make it running, I am suggesting you to read the guides from MySQL page to everything in details. Bare in mind that you need to test and prepare your databases before using it in production mode.Okay, lets begin.

Step 1. Servers
I will use the following FreeBSD servers that are all in the same network (192.168.1.* in this example):Management (MGM) node 192.168.1.1
MySQL server (SQL) node 192.168.1.2
Data (NDBD) node “A” 192.168.1.3
Data (NDBD) node “B” 192.168.1.4

Step 2. Setting Up the Management Node
Using FreeBSD, installation using ports is pretty simple.

cd /usr/ports/databases/mysql50-server

Then,

shell>make –with-ndbcluster
shell>make install

After installation, we will be insterested in the file /usr/local/libecex/ndb_mgmd.
That is the ndb management executable.

Next, we must create the cluster configuration file, /usr/local/mysql/var/mysql-cluster/config.ini:

The path may differ in Linux or other distributions.

3. Setting Up the SQL Node
shell>/usr/local/etc/mysql-server start

4. Setting Up the Data Node
(in /etc/rc.conf make sure mysql_enable=”YES”)
>>/etc/my.cnf

shell>cd /usr/local/libexec/
shell>./ndbd

shell>ndb_mgm

  1. One Response to “Howto Setup MySql Cluster on FreeBSD : Quick Guide”

  2. Hi,

    I’m Alisha from Wowzio, and I’m excited to tell you about our new widget platform that helps bloggers increase readership by providing engaging widgets containing your blog’s rich content. You can check out widgets customized for your blog here:

    Wowzio Widgets for your Blog

    I wanted to reach out to you to ask for your feedback on these widgets (feel free to install them on your blog, if you feel they are a good fit). I’m sorry for leaving this message via a comment, it’s not at all our intent to spam you ( which is why i’m leaving this comment on an older post and you can always remove this comment ). Again, we would love to hear your feedback.

    Thanks,
    Alisha Wright
    alisha.wright1@gmail.com

    By Alisha on Sep 9, 2008

Post a Comment

Software Blogs - BlogCatalog Blog Directory Technology Technology blogs