? ? hardware is configured
? ?
Environment of the smallest group needs ? ? common PC Server * 2 (4 servers)
? ?
Environment of ? ? imitate
? ?
) of version of above of ? ? Red Hat Linux9 For X86 (or Red Hat AS 2, glibc-2.2, static, gcc
? ?
4.1.12 Binares of version of ? ? MySQL
? ?
Version of ? ? Mysql-max Binary supports Linux, Max Os X and Solaris only at present
? ?
This ? ? plan is not involved compile installation from source code
? ?
Utility of address of IP of ? ? lead plane
? ?
? ? Ndb1_mgmd_sqld 1192.168.1.100 Ndb Node1+mgmd Node1+sqld Node1
? ? Ndb2_sqld2 192.168.1.200 Ndb Node2+sqld Node2
? ?
? ? Mgmd:mAnagement Server
? ? Sqld:mYsql Server
? ? Ndb:sToraged Node (share-nothing, base In Memory)
? ?
? ? is installed
? ?
? ? arrives from Http://dev.mysql.com/downloads/mysql/4.1.html download Mysql-max-4.1.12-pc-linux-gnu-i686.tar.gz / Var/tmp
? ? Storage And SQL Node Installation
? ?
? ? carries out following processes on two lead plane
? ?
? ? Shell%26gt;groupadd Mysql
? ? Shell%26gt;useradd -g Mysql Mysql
? ? Shell%26gt;tar Zxfv Mysql-max-4.1.12-pc-linux-gnu-i686.tar.gz
? ? Shell%26gt;cp -vr Mysql-max-4.1.12-pc-linux-gnu-i686 /usr/local/mysql-max-4.1.12-pc-linux-gnu-i686
? ? Shell%26gt;cd /usr/local
? ? Shell%26gt;ln -s Mysql-max-4.1.12-pc-linux-gnu-i686 Mysql
User=mysql of - of ? ? Shell%26gt;cd Mysql;scripts/mysql_install_db
? ? Shell%26gt;chown -R Root. ;chown -R Mysql Data;chgrp -R Mysql.
? ? Shell%26gt;cp Support-files/mysql.server /etc/rc.d/init.d/
? ? Shell%26gt;chmod +x /etc/rc.d/init.d/mysql.server
? ? Shell%26gt;chkconfig- - Add Mysql.server
Level 3 Mysql.server Off of - of ? ? Shell%26gt;chkconfig
? ? Management Node Installation
? ?
? ? carries out following processes on lead plane Ndb1_mgmd_sqld1
? ?
? ? Shell%26gt;cd /var/tmp
? ? Shell%26gt;tar -zxvf Mysql-max-4.1.12a-pc-linux-gnu-i686.tar.gz /usr/local/bin '*/bin/ndb_mgm*'
? ? Configuration
? ? Configuring The Storage And SQL Nodes
? ?
? ? carries out following processes on two lead plane:
? ?
? ? Shell%26gt;vi /etc/my.cnf
? ? [# Options For Mysqld Process of ? of ? of ? of ? of ? of ? of ? of ? of ? of ? of MYSQLD] ? ? :
# Run NDB Engine of ? of ? of ? of ? of ? of ? of ? of ? of ? of ? of ? ? Ndbcluster
# Location Of MGM Node of ? of ? ? Ndb-connectstring=192.168.1.100
? ?
? ? [# Options For Ndbd Process of ? of ? of ? of ? of ? of ? of MYSQL_CLUSTER] ? ? :
# Location Of MGM Node of ? of ? ? Ndb-connectstring=192.168.1.100
? ?
? ? Configuring The Management Node
? ?
? ? carries out following processes on lead plane Ndb1_mgmd_sqld1
? ?
? ? Shell%26gt;mkdir /var/lib/mysql-cluster
? ? Shell%26gt;cd /var/lib/mysql-cluster
? ? Shell%26gt;vi Config.ini
? ? [# Options Affecting Ndbd Processes On All Data Nodes of ? of NDBD DEFAULT] ? :
# Number Of Replicas of ? of ? of ? ? NoOfReplicas=2
# How Much Memory To Allocate For Data Storage of ? of ? of ? ? DataMemory=80M
# How Much Memory To Allocate For Index Storage of ? of ? ? IndexMemory=52M
? ? # For DataMemory And IndexMemory, we Have Used The
? ? # Default Values. Since The "world" Database Takes Up
? ? # Only About 500KB, this Should Be More Than Enough For
? ? # This Example Cluster Setup.
? ? [TCP DEFAULT]
? ?
? ? [# Management Process Options of ? of ? of ? of ? of ? of NDB_MGMD] ? ? :
? ? Hostname=192.168.1.100 # Hostname Or IP Address Of MGM Node
# Directory For MGM Node Logfiles of ? of ? ? Datadir=/var/lib/mysql-cluster
? ?
? ? [# Options For Data Node "A" of ? of ? of ? of ? of ? of ? of ? of ? of ? of ? of NDBD] ? ? :
? ? # (one [NDBD] Section Per Data Node)
# Hostname Or IP Address of ? of ? of ? of ? of ? of ? ? HostName=192.168.1.100
# Directory For This Data Node's Datafiles of ? of ? ? DataDir=/usr/local/mysql/data
? ?
? ? [# Options For Data Node "B" of ? of ? of ? of ? of ? of ? of ? of ? of ? of ? of NDBD] ? ? :
# Hostname Or IP Address of ? of ? of ? of ? of ? of ? ? Hostname=192.168.1.200
# Directory For This Data Node's Datafiles of ? of ? ? Datadir=/usr/local/mysql/data
? ?
? ? [# SQL Node Options of ? of ? of ? of ? of ? of ? of ? of ? of ? of ? of MYSQLD] ? ? :
# Hostname Or IP Address of ? of ? of ? of ? of ? ? Hostname=192.168.1.100
? ? # Directory For SQL Node's Datafiles
? ? # (additional Mysqld Connections Can Be
? ? # Specified For This Node For Various
? ? # Purposes Such As Running Ndb_restore)
? ?
? ? [MYSQLD] # SQL Node Options:
# Hostname Or IP Address of ? of ? of ? of ? of ? ? Hostname=192.168.1.200
? ? # Directory For SQL Node's Datafiles
? ? # (additional Mysqld Connections Can Be
? ? # Specified For This Node For Various
? ? # Purposes Such As Running Ndb_restore)
? ?
? ? first time is started
? ?
? ? carries out following processes on lead plane Ndb1_mgmd_sqld1
? ?
? ? Shell%26gt;Ndb_mgmd -f /var/lib/mysql-cluster/config.ini
? ?
? ? carries out following processes on two lead plane
? ?
Initial (note:- of - of ? ? Shell%26gt;ndbd- Initial option can be used when be started for the first time only)
? ? Shell%26gt;/etc/init.d/mysql.server Start
? ?
? ? checks
? ?
? ? carries out following processes on lead plane Ndb1_mgmd_sqld1
? ? Shell%26gt;Ndb_mgm
? ?- - NDB Cluster- - Management Client- -
? ? Ndb_mgm%26gt;Show
? ? Connected To Management Server At: Localhost:1186
? ? Cluster Configuration
? ?---------------------
? ? [Ndbd(NDB)] ? ? 2 Node(s)
? of @192.168.0.100 of ? of ? of ? ? Id=2 (Version: 4.1.12, nodegroup: 0, master)
? of @192.168.0.200 of ? of ? of ? ? Id=3 (Version: 4.1.12, nodegroup: 0)
? ?
? ? [Ndb_mgmd(MGM)] 1 Node(s)
? of @192.168.0.100 of ? of ? of ? ? Id=1 (Version: 4.1.12)
? ?
? ? [Mysqld(SQL)] ? 1 Node(s)
? of ? ? Id=4 (Version: 4.1.12)
? ?
Information of ? ? occurrence as above states Mysql teeming installation is successful
? ?
Sampling test of ? ? data
? ?
? ? carries out following processes on lead plane Ndb1_mgmd_sqld1
? ?
? ? Shell%26gt;/usr/local/mysql/bin/mysql -u Root Test
? ? MySQL%26gt;DROP TABLE IF EXISTS City;
? ? CREATE TABLE City (
? ? ID Int(11) NOT NULL Auto_increment,
? ? Name Char(35) NOT NULL Default '' ,
? ? CountryCode Char(3) NOT NULL Default '' ,
? ? District Char(20) NOT NULL Default '' ,
? ? Population Int(11) NOT NULL Default '0' ,
? of ? ? PRIMARY KEY (ID)
? ? ) ENGINE=NDBCLUSTER;
? ?
? ? MySQL%26gt;INSERT INTO City VALUES (1, 'Kabul' , 'AFG' , 'Kabol' , 1780000);
? ? INSERT INTO City VALUES (2, 'Qandahar' , 'AFG' , 'Qandahar' , 237500);
? ? INSERT INTO City VALUES (3, 'Herat' , 'AFG' , 'Herat' , 186800);
? ?
? ? carries out following processes on lead plane Ndb2_sqld2
? ?
? ? Shell%26gt;/usr/local/mysql/bin/mysql -u Root Mysql
? ? MySQSL%26gt;select * From City;
? ?
If ? ? is successful indication data information,State group is started already successfully
? ?
? ? Safe Shutdown And Restart
? ?
? ? carries out following processes on lead plane Ndb1_mgmd_sqld1
? ?
? ? Shell%26gt;ndb_mgm -e Shutdown (shut group server,Storage Node also is met be shut automatically)
? ?
? ? carries out following processes on two lead plane
? ?
? ? Shell%26gt;/etc/init.d/mysql.server Stop
? ?
? ? starts group afresh (cannot make a mistake orderly)
? ?
? ? carries out following processes on lead plane Ndb1_mgmd_sqld1
? ?
? ? Shell%26gt;Ndb_mgmd -f /var/lib/mysql-cluster/config.ini
? ?
? ? carries out following processes on two lead plane
? ?
? ? Shell%26gt;/usr/local/mysql/bin/ndbd
? ?
Sqld process is started after ? ? starts Ndbd process
? ?
? ? Shell%26gt;/etc/init.d/mysql.server Start
? ?
? ? is added:
? ?
Departmental cent explains in ? ? Config.ini
? ?
? ? [COMPUTER] : Define teeming lead plane.
? ?
? ? [NDBD] : Define teeming data node.
? ?
? ? [MYSQLD] : Define Sql Server node.
? ?
? ? [MGM | NDB_MGMD] : Defines The Management Server Node In The Cluster.
? ? [TCP] : Defines TCP/IP Connections Between Nodes In The Cluster, with TCP/IP Being The Default Connection Protocol.
? ? [SHM] : Defines Shared-memory Connections Between Nodes. Before MySQL 4.1.9,This function must be used- - With-ndb-shm Option is compiled go in, begin from MySQL 4.1.9-max version, it Is Enabled By Default
...