标签:oca clu 修改 readline lin useradd bis ide 需要
Pxc安装文档yum install perl-DBI perl-DBD-MySQL perl-Time-HiRes perl-IO-Socket-SSL -y
下载pxc mysql 包
Percona-XtraDB-Cluster-5.6.26-rel74.0-25.12.1.Linux.x86_64.tar.gz
网盘里面有
Useradd mysql
tar -xf Percona-XtraDB-Cluster-5.6.26-rel74.0-25.12.1.Linux.x86_64.tar.gz
mv Percona-XtraDB-Cluster-5.6.26-rel74.0-25.12.1.Linux.x86_64 /usr/local/mysql
chowm -R mysql. /usr/local/mysql
初始化mysql
./scripts/mysql_install_db --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data/
Cat /etc/my.cnf
[client]
port = 3306
[mysqld]
server_id=88
basedir = /usr/local/mysql
port = 3306
datadir = /usr/local/mysql/data
socket = /tmp/mysql.sock
user=mysql
default_storage_engine=InnoDB
innodb_locks_unsafe_for_binlog=1
innodb_autoinc_lock_mode=2
wsrep_cluster_name="mycluster"
#cluster 的名字
wsrep_cluster_address=gcomm://192.168.1.5,192.168.1.11,192.168.1.90
#cluster 中的节点ip
wsrep_node_address=192.168.1.4
#cluster 当前节点的ip
wsrep_provider=/usr/local/mysql/lib/libgalera_smm.so
wsrep_sst_method=rsync
wsrep_sst_auth="sstuser:sstuser"
wsrep_node_name=pxc1
~
第一台pxc 启动
/etc/init.d/mysql bootstrap-pxc
第二台和第三台同上操作
My.cnf需要修改节点ip
三台都启动后可以通过
mysql> show status like ‘wsrep%‘;
标签:oca clu 修改 readline lin useradd bis ide 需要
原文地址:http://blog.51cto.com/8934920/2341046