Mysql cluster installation and configuration

Source: Internet
Author: User

Install and configure mysql cluster on centos6.0

I am using the rpm package of mysql cluster 7.1.15a.

I used five VMS:
One Management node, two SQL nodes, and two data nodes

The installation and configuration steps are as follows:

1. Management node Installation

Rpm-vih/home/aa/MySQL-Cluster-gpl-management-7.1.15a-1.rhel5.i386.rpm

Rpm-vih/home/aa/MySQL-Cluster-gpl-tools-7.1.15a-1.rhel5.i386.rpm

Rpm-vih/home/aa/MySQL-Cluster-gpl-extra-7.1.15a-1.rhel5.i386.rpm

2. Install both SQL nodes (both must be installed)

Rpm-vih/home/aa/MySQL-Cluster-gpl-server-7.1.15a-1.rhel5.i386.rpm

Rpm-vih/home/aa/MySQL-Cluster-gpl-client-7.1.15a-1.rhel5.i386.rpm

3. install two data nodes

Rpm-vih/home/aa/MySQL-Cluster-gpl-storage-7.1.15a-1.rhel5.i386.rpm

4. Manage node configuration

Mkdir/var/lib/mysql-cluster

Cd/var/lib/mysql-cluster

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

[Ndbd default]
NoOfReplicas = 2
DataMemory = 80 M
IndexMemory = 18 M

[Tcp default]

[Ndb_mgmd]
Hostname = 192.168.1.103 # management Node Address
Datadir =/var/lib/mysql-cluster

[Ndbd]
Hostname = 192.168.1.100 # data node ip Address
Datadir =/var/lib/mysql-cluster/data # The data directory is manually created on the data node.

[Ndbd]
Hostname = 192.168.1.61 # ip address of the second data node
Datadir =/var/lib/mysql-cluster/data

[Mysqld]
Hostname = 192.168.1.101 # SQL node ip Address

[Mysqld]
Hostname = 192.168.1.104 # ip address of the second SQL Node


5. data node configuration (both nodes are configured)

Vim/etc/my. cnf

[Mysqld]
Ndbcluster
Ndb-connectstring = 192.168.1.103 # manage node ip

[Mysql_cluster]
Ndb-connectstring = 192.168.1.103 # manage node ip

6. SQL node configuration (both nodes are configured)

Vim/etc/my. cnf

[Mysqld]
Ndbcluster
Ndb-connectstring = 192.168.1.103 # manage node ip
Port = 3306

[Mysql_cluster]
Ndb-connectstring = 192.168.1.103 # manage node ip

7. Start mysql cluster

Start the management node, start the data node, and then start the SQL node.

Start the management node:

Ndb_mgmd-f/var/lib/mysql-cluster/config. ini

Start the data node:

Ndbd

Start an SQL node:

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

8. Complete the configuration and check the configuration.

Run the following command on the Management node:

 


Supplement: simple personal configuration. If there are any deficiencies, please forgive me.

 

Author: "I am the master of my youth"

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.