Fast configuration of dual NDBD node Cluster in MySQL

Source: Internet
Author: User
1. Configure the environment. MGM: 192.168.0.31NDBD1: 192.168.0.32NDBD2: 192168.0.33SQL1: 192.168.0.34SQL2: 192.168.0.302. install the software (

1. Configure the environment. MGM: 192.168.0.31 NDBD1: 192.168.0.32 NDBD2: 192168.0.33 SQL1: 192.168.0.34 SQL2: 192.168.0.30 2. install the software (

1. Configure the environment;
MGM: 192.168.0.31
NDBD1: 192.168.0.32
NDBD2: 192168.0.33
SQL1: 192.168.0.34
SQL2: 192.168.0.30

2. Software Installation
(1) Management node MGM
First, create a configuration file for the management node at an appropriate location;
Config. ini
[Ndbd default]
NoOfReplicas = 2
DataMemory = 80 M
IndexMemory = 18 M
[Tcp default]
Portnumber = 2202

[Ndb_mgmd]
Hostname = 192.168.0.31
Datadir =/var/lib/mysql-cluster
[Ndbd]
Hostname = 192.168.0.32
Datadir =/usr/local/mysql/data
[Ndbd]
Hostname = 192.168.0.33
Datadir =/usr/local/mysql/data
[Mysqld]
Hostname = 192.168.0.30
[Mysqld]
Hostname = 192.168.0.34
A. Change the address to the/var/tmp directory, decompress the mysql-cluster compressed file, and retrieve ndb_mdmd and ndb_mdm;
B. Change the path to the copied directory and make sure the two files are executable;
Chmod + x ndb_mgm *
C. Create a mysql folder under/usr/local;
(2) Data nodes NDBD and SQL nodes;
Configure the data node NDBD and SQL node;
Perform the following configuration on each SQL node in the/etc/my. cnf file;
[Client]
Socket =/usr/local/mysql/sock/mysql. sock

[Mysqld]
Ndbcluster
Datadir =/usr/local/mysql
Socket =/usr/local/mysql/sock/mysql. sock
Ndb-connectstring = 192.168.0.31
# User = mysql
# Default to using old password format for compatibility with mysql 3.x
# Clients (those using the mysqlclient10 compatibility package ).
Old_passwords = 1

# Disabling symbolic-links is recommended to prevent assorted security risks;
# To do so, uncomment this line:
# Symbolic-links = 0
[Mysql_cluster]
Ndb-connectstring = 192.168.0.31

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.