RedHat as4-u2 MySQL 5.0.22 Cluster configuration

Source: Internet
Author: User
Tags mysql database linux

Recently saw a lot of information about cluster, has been studying Linux system-level load balancing and high availability, but has not been completely successful, but to achieve a number of simple services; today, in the collection of data to see the cluster about MySQL, it does not look very complicated, It took an afternoon of research, reference to the Nanu predecessors of the MySQL cluster configuration steps, a simple cluster is successful. But there's one thing I don't understand, is it? MySQL cluster configuration is complete, only tables in the database can be synchronized, and the entire library cannot be synchronized? Please master twos, thank you!

A Experimental environment

1. Linux operating system version. RedHat AS4-U2

2. MySQL database version mysql-max-5.0.22-linux-i686-glibc23.tar.gz

A total of three machine PCs installed Redhat AS4-U2 version, first of all, to ensure that the system does not have a package with MySQL, and some words on the rpm–e.

PC1 ip:192.168.10.196

PC2 ip:192.168.10.197

PC3 ip:192.168.10.198

Two Installation procedure

1. The following commands need to be executed on PC1, PC2, in order:

MV mysql-max-5.0.22-linux-i686-glibc23.tar.gz/usr/local/

cd/usr/local/

Tar zxvf mysql-max-5.0.22-linux-i686-glibc23.tar.gz

RM mysql-max-5.0.22-linux-i686-glibc23.tar.gz

MV Mysql-max-5.0.22-linux-i686-glibc23 MySQL

Groupadd MySQL

useradd-g MySQL MySQL

CD MySQL

scripts/mysql_install_db--user=mysql

Chown-r Mysql:mysql.

Cp/usr/local/mysql/support-files/my-medium.cnf/etc/my.cnf

Vi/etc/my.cnf

Locate the Myisam_sort_buffer_size = 8M line, and then add the following two lines later:

Ndbcluster

ndb-connectstring=192.168.10.198

Then add the following six lines to the last line of MY.CNF:

[NDBD]

connect-string=192.168.10.198

[NDB_MGM]

connect-string=192.168.10.198

[NDB_MGMD]

Config-file=/var/lib/mysql-cluster

After the modification, save the launch!

Mkdir/var/lib/mysql-cluster

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.