标签为 SST 的文章

绕开SST通过IST方式添加Node到Percona XtraDB Cluster

参考资料:
https://github.com/percona/xtradb-cluster-tutorial/blob/master/instructions/Avoiding%20SST.rst#bad-configuration

服务器:
idc1-server1, idc1-server2, idc1-server3

1. 安装Percona XtraDB Cluster,在 idc1-server1,idc1-server2,idc1-server3 上
$ sudo yum install http://www.percona.com/downloads/percona-release/percona-release-0.0-1.x86_64.rpm
$ sudo yum install http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
$ sudo yum install Percona-Server-shared-compat
$ sudo yum install Percona-XtraDB-Cluster-server Percona-XtraDB-Cluster-client
$ sudo mkdir -p /opt/mysql/{data,tmp,run,binlogs,log}
$ sudo chown mysql:mysql /opt/mysql/{data,tmp,run,binlogs,log}
$ sudo -i
# su - mysql
$ mysql_install_db --user=mysql --datadir=/opt/mysql/data/
$ exit
# exit

2. 配置 my.cnf,在 idc1-server1 上
[heydevops@idc1-server1 ~]$ sudo vim /etc/my.cnf

 
[mysqld]
# basic settings
datadir = /opt/mysql/data
tmpdir = /opt/mysql/tmp
socket = /opt/mysql/run/mysqld.sock
pid-file = /opt/mysql/run/mysqld.pid

# innodb settings
default-storage-engine = INNODB
innodb_file_per_table = 1
log-bin = /opt/mysql/binlogs/bin-log-mysqld
log-bin-index = /opt/mysql/binlogs/bin-log-mysqld.index
innodb_data_home_dir = /opt/mysql/data
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /opt/mysql/data

# xtradb cluster settings
binlog_format = ROW
wsrep_cluster_name = mycluster
wsrep_cluster_address = gcomm://10.100.1.3,10.100.1.4,10.100.1.5
wsrep_node_address = 10.100.1.3
wsrep_provider = /usr/lib64/libgalera_smm.so
wsrep_sst_method = xtrabackup
wsrep_sst_auth = sst:secret
wsrep_provider_options = "gcache.size=8G;"
wsrep_sst_receive_address = 10.100.1.3
innodb_locks_unsafe_for_binlog = 1
innodb_autoinc_lock_mode = 2

# server id
server-id=123

# other settings
[mysqld_safe]
log-error = /opt/mysql/log/mysqld.log
pid-file = /opt/mysql/run/mysqld.pid
open-files-limit = 8192

[mysqlhotcopy]
interactive-timeout

[client]
port = 3306
socket = /opt/mysql/run/mysqld.sock
default-character-set = utf8

阅读全文 »

, , , ,

2 Comments