Wednesday, January 12, 2005

MySQL Cluster

MySQL Cluster is included in version 4.1 of the MySQL database server, as part of the MySQL Max packages.

Based on MySQL 4.18.

Config.ini under bin directory:

# file "config.ini" - showing minimal setup with 1 DB node,
# 1 management server and 3 MySQL server.
# The empty default sections are not needed, only shown for clarity.
# Storage nodes are required to provide a host name but MySQL Servers
# is not. Thus the configuration can be dynamic as to setting up the
# MySQL Servers.
# If you don't know the host name of your machine, use localhost.
# DataDir also has a default but it is recommended to set this
# parameter explicitly.

[NDBD DEFAULT]
NoOfReplicas: 1

[MYSQLD DEFAULT]
[NDB_MGMD DEFAULT]
[TCP DEFAULT]

[COMPUTER]
Id : 1
HostName : biocluster

[COMPUTER]
Id : 2
HostName : 192.168.2.101

[COMPUTER]
Id : 3
HostName : 192.168.2.102

[NDB_MGMD]
#HostName = biocluster
Id : 1
ExecuteOnComputer : 1
LogDestination : CONSOLE;FILE:filename=cluster.log,maxsize=1000000,maxfiles=6

[NDBD]
Id : 2
#HostName = biocluster
ExecuteOnComputer : 1
DataDir: /Volumes/LIMS/data/database/ndb
#ServerPort : 2203

[MYSQLD]
Id : 3
ExecuteOnComputer : 1

[MYSQLD]
Id : 4
ExecuteOnComputer :2

[MYSQLD]
Id : 5
ExecuteOnComputer :3


In each node's my.cnf file, add

[mysqld]
ndbcluster
ndb-connectstring=192.168.2.100:1186


Note: From 4.18, the default connection port changes to 1186.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home