Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Database \ MySQL Tutorial: Building MySQL Cluster under Linux     - Apache site default home page settings (Server)

- Linux the best download manager uGet (Linux)

- Nine artifact control disk partition under Linux (Linux)

- A process of how to get the current traffic in GNU Linux (Linux)

- How to configure AWStats in Ubuntu Server (Server)

- Chromium Install Flash Official Guide (Linux)

- to compile FFmpeg In Ubuntu (Linux)

- CentOS boot image to achieve semi-automatic installation (Linux)

- Linux kernel likely and unlikely to resolve macro definitions (Linux)

- Use OpenSSL for RSA encryption and decryption (Linux)

- Oracle to use full-text indexing (Database)

- Android Custom View password box example (Programming)

- The method of installing software under Ubuntu Linux (Linux)

- Linux VMware virtual machine after the cloning of the card can not start to solve (Linux)

- Hadoop2.6.3 build clusters and the development of MapReduce WIN7 by Eclipse on Linux demo (Server)

- MySQL Data Types (Database)

- Linux for enterprises to build a firewall (Linux)

- C ++ 11 smart pointers (Programming)

- Linux system performance tuning of Analysis (Linux)

- Delay for the specified IP port analog network to send and receive packets on Linux (Linux)

  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.
- Java thread lifecycle (Programming)
- Upload the project to GitHub, synchronous remote repository Github (Linux)
- CentOS7 virtual machine creation failed Solution (Linux)
- Configuring DNS process under CentOS 6.5 (Server)
- Hutchison DG standby database CPU consumption reached bottleneck repair (Database)
- CentOS install Memcached (Server)
- Linux user status query, and to unlock locked user (Linux)
- GDB remote connections RX Probe online debug program (Programming)
- MyEclipse configuration necessary (Linux)
- Service Discovery: Zookeeper vs etcd vs Consul (Server)
- How to upgrade the kernel to 3.13.7 on Ubuntu / Linux Mint (Linux)
- Linux for enterprises to build a firewall (Linux)
- Linux system font color change (Linux)
- Android project using the command to create and install the package (Programming)
- Oracle Linux 5.9 configuration Xmanager (Linux)
- Spring Data study notes -Helloworld (Programming)
- Fun music library in Linux using command line (Linux)
- CentOS x86 64bit upgrade to 2.7 Python2.6 (Linux)
- Java 8 perspective annotation types (Programming)
- Linux environmental performance data acquisition system (Linux)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.