Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Database \ MySQL Tutorial: Building MySQL Cluster under Linux     - WordPress blog installation Redis Cache (Server)

- Graphics of Java Tools (Programming)

- Windows Server 2012 R2 Datacenter install SQL Server 2016 CTP (Database)

- How to use Git to upload code to GitHub project (Linux)

- Installation Sublime Text 3 (Build 3065) text editor in Ubuntu (Linux)

- CoreOS Linux introduces Kubernetes kubelet (Server)

- U disk to install Windows and Ubuntu 15.04 dual system (Programming)

- Hadoop 2.0 Detailed Configuration Tutorial (Server)

- Use mdadm tool to create software RAID 0 (Linux)

- jQuery get value drop-down list and select text (Programming)

- Objective-C basic program structure (Programming)

- Erase do with HTML5 Canvas and diffusion effect (Programming)

- linux server security (Linux)

- Android Studio simple setup (Linux)

- RHEL6.5 replace local YUM source (Linux)

- Ubuntu install ruby (Linux)

- Installation Yarock 1.1.4 Music Player in Ubuntu (Linux)

- Linux and hardware (Linux)

- Python common data type summary (Programming)

- The REVERSE function of DB2 (Database)

  MySQL Tutorial: Building MySQL Cluster under Linux
  Add Date : 2018-11-21      
  Install version mysql-cluster-gpl-7.4.6-linux-glibc2.5-i686.tar.gz
System for the Linux virtual machine

Virtual Machine 2 (assurance firewall turned off, or may be unsuccessful deployment)

ip: as management, data node, the service node

ip: as a data node, the service node

A: install cluster software

Each node requires the following steps (in fact, the management can not, but I do when they are together, so not too many studies):

1, download extract to / usr / local / mysql (you can choose your own directory)

tar -zxvf mysql-cluster-gpl-7.4.6-linux-glibc2.5-i686.tar.gz

mv mysql-cluster-gpl-7.4.6-linux-glibc2.5-i686 / usr / local / mysql /

2, create mysql user

useradd mysql

chown -R mysql: mysql / usr / local / mysql /

3, modify / etc / profile for ease of use

PATH = $ PATH: / usr / local / mysql / bin

export PATH

4. Installation mysq (step source installation of mysql)

cd / usr / local / mysql / scripts

./mysql_install_db --basedir = / usr / local / mysql / --datadir = / usr / local / mysql / data / --user = mysql

5, configuration management node ndb

Copy / usr / local / mysql / bin / ndb_mgm, ndb_mgmd two files to / usr / local / bin

cp / usr / local / mysql / bin / ndb_mgm * / usr / local / bin

All of this installation is finished, the following is to start

Boot sequence node for node management -> Data Node -> SQL node

Two: Start the management node

Create a profile on the management node config.ini as follows

mkdir / var / lib / mysql-cluster

vim /var/lib/mysql-cluster/config.ini

config.ini contents

[Ndbd default]
 NoOfReplicas = 2 # image quantity of each data node, if the node is 1 when the data is broken then the cluster is unavailable, "opposite 1
DataMemory = 200M # each data node in the memory allocated to the data
IndexMemory = 30M # each data node in the memory allocated to the index

 id = 1
 hostname = # IP management node
 datadir = / var / lib / mysql-cluster / # management node directory

 id = 2
 hostname = # IP node data
 datadir = / usr / local / mysql / data # data node directory
 id = 3
 hostname = # IP node data
 datadir = / usr / local / mysql / data # data node directory
 id = 4
 hostname = #sql node IP
 id = 5
 hostname = #sql node IP

(Note: NoOfReplicas data indicating the number of copies, if it is 1, there will be data nodes single point of failure)

Start Management Service on the management node

ndb_mgmd -f /var/lib/mysql-cluster/config.ini
If you can reload modified config.ini
ndb_mgmd -f /var/lib/mysql-cluster/config.ini --reload - add to reload

ndb_mgm -e show to check the cluster status
ndb_mgm -e shutdown shut down the cluster software

Management node started up.
Other machines connected to the management node test

First of all the other nodes in the management node is not known which ip (because no other nodes config.ini)

Three: Each node configuration file /etc/my.cnf

So you want to configure profiles and services on /etc/my.cnf,mysql start time will default load /etc/my.cnf

my.cnf as follows:

 datadir = / usr / local / mysql / data
 basedir = / usr / local / mysql
 socket = / tmp / mysql.sock
 port = 3306
 ndb-connectstring = --- management node ip
 ndb-connectstring = --- management node ip

Then on unmanaged node ndb_mgm -e show could see just the cluster status

2 Start the data node

/ Usr / local / mysql / bin / ndbd --initial

To add --initial parameters for the first time after the installation starts data nodes, and other times do not increase, unless it is in backup, restore or restart after configuration changes

ndb_mgm -e show cluster status

3 start service node

/ Usr / local / mysql / bin / mysqld_safe --user = mysql &

ndb_mgm -e show cluster status

To build on the success of this test, then adjourned.
- Oracle Character Set Summary (Database)
- RedHat Redis Linux installation (Database)
- No password on Oracle and MySQL login (Database)
- Java how to achieve bubble sort the problem Arraylist (Programming)
- JavaScript common functions summary (Programming)
- Linux firewall security (Linux)
- RHEL5.8 physical opportunities to Read-only file system (Linux)
- How to install Laravel PHP framework on CentOS 7 / Ubuntu 15.04 (Server)
- Linux file system data file deletion problem space is not freed (Database)
- Ubuntu 12.04 / 14.04 users to install software LyX document processing (Linux)
- Linux Fundamentals of the memory management mechanism (Linux)
- Python Flask environment to build (Linux)
- Report generation CPU, memory, and input and output ports with the sar command (Linux)
- Hands to teach you to solve Ubuntu error message (Linux)
- Compare several ways to transfer files between Linux hosts (Linux)
- APT-mirror using a four-step configuration Ubuntu local depot (Linux)
- Ubuntu install video playback software SMPlayer (Linux)
- Ubuntu install Wireshark (Linux)
- Use PDFBox processing PDF documents (Linux)
- VMware6 achieve nat Internet (Linux)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.