How to install and configure a MySQL Cluster _ MySQL based on two servers

Source: Internet
Author: User
How to install and configure a MySQL Cluster Mysql Cluster based on two servers

This article describes how to install and configure a MySQL Cluster based on two servers. MySQL can continue to run when any server encounters a problem or goes down.

Note! Although this is a MySQL Cluster based on two servers, there must be an additional third server as the management node, but this server can be closed after the cluster is started. At the same time, it is not recommended to disable the server as the management node after the cluster is started. Although a MySQL Cluster with only two servers can be established theoretically, the cluster cannot continue to work normally once one server goes down, in this way, the meaning of the cluster is lost. For this reason, a third server is required to run as a management node. In addition, many friends may not have the actual environment of three servers. you can consider conducting experiments in VMWare or other virtual machines.

The following describes the three services:

Server1: mysql1.vmtest.net 192.168.0.1

Server2: mysql2.vmtest.net 192.168.0.2

Server3: mysql3.vmtest.net 192.168.0.3

Servers1 and Server2 serve as servers for configuring the MySQL Cluster. Server3, as a management node, has low requirements. you only need to make minor adjustments to the Server3 system and do not need to install MySQL, server3 can use a low-configuration computer and run other services on server3. 2. install MySQL on server 1 and server 2

================================== From [url] http://www.mysql.com [/ url]download mysql-max-4.1.9-pc-linux-gnu-i686.tar.gz note: mySQL must be of max version. Standard version does not support cluster deployment! Perform the following steps on server 1 and server 2

# Music mysql-max-4.1.9-pc-linux-gnu-i686.tar.gz/usr/local/

# Cd/usr/local/

# Groupadd mysql

# Useradd-g mysql

# Tar-zxvf mysql-max-4.1.9-pc-linux-gnu-i686.tar.gz

# Rm-f mysql-max-4.1.9-pc-linux-gnu-i686.tar.gz

# Music mysql-max-4.1.9-pc-linux-gnu-i686 mysql

# Cd mysql

# Scripts/mysql_install_db -- user = mysql

# Chown-R root.

# Chown-R mysql data

# Chgrp-R mysql.

# Cp support-files/mysql. server/etc/rc. d/init. d/mysqld

# Chmod + x/etc/rc. d/init. d/mysqld

# Chkconfig -- add mysqld. do not start MySQL at this time!

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.