MySQL cluster installation and configuration (6 machines)

Source: Internet
Author: User

Specific installation and configuration:
1)
Preparations:
Six machines with IP addresses
192.168.0. (231-236)
MGM node: 192.168.0.231 (232)
SQL node: 192.168.0.233-234
NDBD node: 192.168.0.235-236
The system is RedHat AS 5.0
The basic components are installed, the network function is enabled, and the firewall is disabled.
Software Version:

 mysql-5.1.21-beta-linux-i686-glibc23.tar.gz

2) Management node installation: (232 and 231 machines)
Shell> cd/var/tmp
Shell> tar-zxvf mysql-5.1.21-beta-linux-i686-glibc23.tar.gz
Shell> cd/var/tmp/mysql-5.1.21-beta-linux-i686-glibc23
Shell> mkdir/usr/local/mysql
Shell> cp bin/ndb_mgm */usr/local/mysql
Shell> cd/usr/local/mysql
Shell> chmod a + x ndb_mgm *
Shell> mkdir data (Used to store data of Management Nodes)
3) Installation of SQL nodes and NDBD nodes: (233-236)
Shell> groupadd mysql
Shell> useradd-g mysql
Shell> cd/var/tmp
Shell> tar-C/usr/local-xzvf mysql-5.1.21-beta-linux-i686-glibc23.tar.gz
Shell> mv/usr/local/mysql-5.1.21-beta-linux-i686-glibc23/usr/local/mysql
Shell> cd mysql
Shell> scripts/mysql_install_db -- user = mysql
Shell> chown-R mysql: mysql/usr/local/mysql


The following steps must be added to the SQL node:
Shell> cp support-files/mysql. server/etc/rc. d/init. d/mysqld
Shell> chmod a + x/etc/rc. d/init. d/mysqld
Shell> chkconfig -- add mysqld
Shell> chkconfig mysqld on(Register MYSQL as a system service)

4) configure the NDBD node:
[Root @ localhost mysql] # cat/etc/my. cnf
[Mysqld]
Ndbcluster
# Ndb-connectstring = 192.168.0.231
# Ndb-connectstring = 192.168.0.20.
In this way, the connection is successful. However, when I came here today, I found that all of them were DOWN.
Ndb-connectstring = 192.168.0.231, 192.168.0.133
[Mysql_cluster]
# Ndb-connectstring = 192.168.0.231
# Ndb-connectstring = 192.168.0.20.
Ndb-connectstring = 192.168.0.231, 192.168.0.133
[Root @ localhost mysql] #

5) configure the SQL node:
[Root @ localhost mysql] # cat/etc/my. cnf
[Mysqld]
Basedir =/usr/local/mysql/
Datadir =/usr/local/mysql/data/
Port = 3306
User = nobody
Socket =/tmp/mysql. sock

Ndbcluster
# Ndb-connectstring = 192.168.0.231
# Ndb-connectstring = 192.168.0.20.
Ndb-connectstring = 192.168.0.231, 192.168.0.133
[Ndbd]
Connect-string = 192.168.0.235
[Ndbd]
Connect-string = 192.168.0.236

[Ndbd_mgm]
Connect-string = 192.168.0.231
[Ndbd_mgm]
Connect-string = 192.168.0.20.
[Ndbd_mgmd]
Config-file =/etc/config. ini


[Mysql_cluster]
# Ndb-connectstring = 192.168.0.231
# Ndb-connectstring = 192.168.0.20.
Ndb-connectstring = 192.168.0.231, 192.168.0.133
[Root @ localhost mysql] #
  • 1
  • 2
  • 3
  • Next Page

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.