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: