Mysql-cluster Cluster

Source: Internet
Author: User

Lab Environment:

CentOS Release 5.5 (three)

MySQL Software: http://dev.mysql.com/get/Downloads/MySQL-Cluster-7.1/ mysql-cluster-gpl-7.1.4b-linux-i686-glibc23.tar.gz/from/http://gd.tuwien.ac.at/db/mysql/

Management node: 192.168.1.22

Data node: 192.168.1.23

Data node: 192.168.1.24

SQL node: 192.168.1.23/24


1 parts

Management Node Installation:

Groupadd MySQL set up data user group

Useradd mysql-g mysql build mysql user and give MySQL group permission

MV Mysql-cluster-gpl-7.1.4b-linux-i686-glibc23.tar.gz/usr/local

Cd/usr/local

TAR-ZXVF mysql-cluster-gpl-7.1.4b-linux-i686-glibc23.tar.gz

MV Mysql-cluster-gpl-7.1.4b-linux-i686-glibc23 MySQL

Chown-r Mysql:mysql MySQL

CD MySQL

scripts/mysql_install_db--user=mysql initializing database do not start MySQL


To configure the management node:

Mkdir/var/lib/mysql-cluster
Cd/var/lib/mysql-cluster

VI Config.ini

[NDBD Default]
noofreplicas=2
datamemory=80m
indexmemory=18m
[NDB_MGMD]
Id=1
hostname=192.168.1.22
Datadir=datadir=/usr/local/mysql/logs
[NDBD]
id=2
hostname=192.168.1.23
datadir=/usr/local/mysql/data/
[NDBD]
Id=3
hostname=192.168.1.24
datadir=/usr/local/mysql/data/
[MYSQLD]
[MYSQLD]

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/49/A7/wKioL1QX3oLhCHyjAADucLjw_gc260.jpg "title=" Enzku3xx]t1jmx2qvfk62 ' f.jpg "alt=" Wkiol1qx3olhchyjaaducljw_gc260.jpg "/>


2 parts

Data node installation database, after you install the initialization database after the management node also need to copy files to the appropriate directory

CP SUPPORT-FILES/MY-MEDIUM.CNF/ETC/MY.CNF
CP Support-files/mysql.server/etc/init.d/mysqld
Vi/etc/my.cnf


datadir=/usr/local/mysql/data/
Ndbcluster
ndb-connectstring=192.168.1.22
[Mysql_cluster]
ndb-connectstring=192.168.1.22
[NDB_MGM]
connect-string=192.168.1.22
[NDB_MGMD]
Config-file=/var/lib/mysql-cluster/config.ini

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/49/A7/wKioL1QX3vGhSRtWAAJGVI-vSSc148.jpg "title=" Phowfa8g4h3h3a3poyk~%9n.jpg "alt=" Wkiol1qx3vghsrtwaajgvi-vssc148.jpg "/>


When the above is configured, start the service on the Management node:

#/usr/local/mysql/bin/ndb_mgmd-f/var/lib/mysql-cluster/config.ini

#netstat –LNTPU See 1186 Open Instructions Start normal


Then start the service on two nodes:

#/usr/local/mysql/bin/ndbd--initial
#service mysqld Start


Test whether the management node is normal:

#/usr/local/mysql/bin/ndb_mgm NDB_MGM

> Show

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/49/A7/wKioL1QX3zHAV19PAAAVbg-hC0s279.gif "title=" Qq20140916145604.gif "alt=" Wkiol1qx3zhav19paaavbg-hc0s279.gif "/>

I experiment from http://hx100.blog.51cto.com/44326/343389/, thank you for this tutorial is clear and understandable, thank you

Mysql-cluster Cluster

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.