RedHat AS4-U2下Mysql 5.0.22集群配置
2007-10-29 11:00:06 来源:WEB开发网[ndbd]
connect-string=192.168.10.198
[ndb_mgm]
connect-string=192.168.10.198
[ndb_mgmd]
config-file=/var/lib/mysql-cluster
修改完毕后,保存推出!
mkdir /var/lib/mysql-cluster
2.在PC3上执行如下的命令,请按照顺序执行:
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
找到myisam_sort_buffer_size = 8M这一行,然后在后面添加如下的两行:
ndbcluster
ndb-connectstring=192.168.10.198
然后到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
修改完毕后,保存推出!
mkdir /var/lib/mysql-cluster
cd /var/lib/mysql-cluster
touch config.ini
vi config.ini 键入如下信息:(半个字符都不能错)
[NDBD DEFAULT]
NoOfReplicas= 2
DataDir= /var/lib/mysql-cluster
[NDB_MGMD]
Hostname= 192.168.10.198
DataDir= /var/lib/mysql-cluster
更多精彩
赞助商链接