Tuesday, May 4, 2010

Create configuration file

Excellent tool to create configuration files for the cluster
http://www.severalnines.com/config/ 

REDO log error

The cluster ran fine today and handled the load fairly well. however towards the market close, i got the following error...
Error in ndbapi.cpp, line: 103, code: 410, msg: REDO log files overloaded, consult online manual (decrease TimeBetweenLocalCheckpoints, and|or increase NoOfFragmentLogFiles).

Going to investigate.
(http://johanandersson.blogspot.com/2007/05/good-configuration.html)

Monday, May 3, 2010

Fresh install

1) After unpacking, follow these steps...

shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
shell> bin/mysqld_safe --user=mysql &

2) cp bin/ndb_mgm* /usr/local/bin (Copy the ndb related binaries)


3) create config file...

mkdir /var/lib/mysql-cluster
cd /var/lib/mysql-cluster
nano config.ini


Thursday, November 19, 2009

float/double fields

pick up a random obscenely big number. so far, I have no clue where this number is coming from...

Hidden primary key

All tables have a hidden primary key (if you dont create one).
This gave me a lot of grief as none of my inserts would go through. It kept complaining about a "missing key".
the options are to either define a primary key or provide a value for the hidden key.

I am now going to see how I can assign a unique value for the hidden key

Tables disappear

While playing around with the cluster i struggled with tables disappearing on me. Every time I shutdown and restarted the cluster, tables I created earlier were no longer there.
After some research I found the issue was the --initial flag that I was passing when starting the cluster. This needs to be done only the first time.

Tuesday, November 17, 2009

Configure/Start cluster

Source: http://www.ctrip.ufl.edu/mysql-cluster-in-debian-lenny-howto

Configure data & index memory in /var/lib/mysql-cluster/config.ini


ndb_mgmd --initial -f /var/lib/mysql-cluster/config.ini


/etc/init.d/mysql start


cd /usr/local/mysql/bin
./ndbd --initial --connect-string="nodeid=2;host=192.168.1.40:1186"