MySQL Cluster dual-computer simulation

Source: Internet
Author: User
Tags mysql version

Hardware configuration

Normal PC Server * 2 (minimum cluster environment requires 4 servers)

Simulated environment

Red Hat linux9 for x86 (or Red Hat as 2 version), glibc-2.2, Static, GCC

MySQL version 4.1.12 binares

The Mysql-max binary version currently supports only Linux, Max OS X, and Solaris

This scenario does not involve compiling the installation from source code

Host IP Address use

Ndb1_mgmd_sqld 1192.168.1.100 Ndb NODE1+MGMD node1+sqld node1

Ndb2_sqld2 192.168.1.200 Ndb node2+sqld node2

Mgmd:management Server

Sqld:mysql Server

Ndb:storaged node (share-nothing,base in memory)

Installation

Download mysql-max-4.1.12-pc-linux-gnu-i686.tar.gz to/var/tmp from http://dev.mysql.com/downloads/mysql/4.1.html

Storage and SQL Node installation

Perform the following procedure on both hosts

Shell>groupadd MySQL

shell>useradd-g MySQL MySQL

Shell>tar ZXFV mysql-max-4.1.12-pc-linux-gnu-i686.tar.gz

SHELL>CP-VR mysql-max-4.1.12-pc-linux-gnu-i686/usr/local/mysql-max-4.1.12-pc-linux-gnu-i686

Shell>cd/usr/local

Shell>ln-s mysql-max-4.1.12-pc-linux-gnu-i686 MySQL

SHELL>CD Mysql;scripts/mysql_install_db–user=mysql

Shell>chown-r root.; Chown-r MySQL data;chgrp-r MySQL.

SHELL>CP support-files/mysql.server/etc/rc.d/init.d/

Shell>chmod +x/etc/rc.d/init.d/mysql.server

Shell>chkconfig--add Mysql.server

Shell>chkconfig–level 3 Mysql.server off

Management Node Installation

Perform the following procedure on the host Ndb1_mgmd_sqld1

Shell>cd/var/tmp

SHELL>TAR-ZXVF mysql-max-4.1.12a-pc-linux-gnu-i686.tar.gz/usr/local/bin ' */bin/ndb_mgm* '

Configuration

Configuring the Storage and SQL Nodes

Perform the following procedure on both hosts:

Shell>vi/etc/my.cnf

[MYSQLD] # Options for MYSQLD process:

Ndbcluster # run NDB engine

NDB-CONNECTSTRING=192.168.1.100 # Location of MGM node

[Mysql_cluster] # Options for NDBD process:

NDB-CONNECTSTRING=192.168.1.100 # Location of MGM node

Configuring the Management Node

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.