| Variable_name      | Value |

wsrep_provider_options =
“gmcast.listen_addr=tcp://192.168.30.221:6030;”

5、运营剩下的四个节点:

wsrep_澳门凯旋门注册网址,cluster_name=pxc_sampson

cd /usr/local

 

Linux:centos 7     IP:192.168.30.221

 

default_storage_engine=Innodb

澳门凯旋门游戏网址,3、配置文件my.cnf

wsrep_sst_receive_address=192.168.30.221:4020

chown -R mysql:mysql /data/mysql/

wsrep_sst_auth=sst:sampson

wsrep_cluster_name=pxc_sampson

 

cd /opt/mysql

1 row in set (0.02 sec)

wsrep_node_incoming_address=192.168.30.221

wsrep_sst_auth=sst:sampson

PXC版本:Percona-XtraDB-Cluster-5.7.17-rel13-29.20.3.Linux.x86_64.ssl101.tar.gz

innodb_autoinc_lock_mode=2

#pxc on a single physical box

在error.log里看到

mkdir -p /data/mysql/mysql_凯旋门074网址,3306/logs/binlog

 

 

[Note] WSREP: Shifting JOINER -> JOINED (TO: 7)

则运转成功,登陆mysql -uroot -p

[Note] WSREP: Synchronized with group, ready for connections

[Note] WSREP: Waiting for SST/IST to complete.

                ③192.168.30.221:3308     cluster_address:6030

wsrep_slave_threads=2

[Note] WSREP: Shifting JOINED -> SYNCED (TO: 7)

wsrep_provider_options =
“gmcast.listen_addr=tcp://192.168.30.221:4030;”

bin/mysqld_safe –defaults-file=/data/mysql/mysql_3307/my.cnf

#pxc on a single physical box

[Note] WSREP: Shifting JOINED -> SYNCED (TO: 7)

innodb_locks_unsafe_for_binlog=1

wget 

1、将二进制包解压,增加mysql账号,做软连接:

wsrep_cluster_address=’gcomm://192.168.30.221:4030,192.168.30.221:5030′

mkdir -p /data/mysql/mysql_3308/logs/binlog

bin/mysqld_safe –defaults-file=/data/mysql/mysql_3308/my.cnf

wsrep_4、启动主节点。provider=/usr/local/mysql/lib/libgalera_smm.so

wsrep_slave_threads=2

mkdir /opt/mysql

wsrep_sst_receive_address=192.168.30.221:5020

[Note] WSREP: Member 1.0 (node3307) synced with group.

| wsrep_cluster_size | 3     |

ln
-s /opt/mysql/Percona-XtraDB-Cluster-5.7.17-rel13-29.20.3.Linux.x86_64.ssl101/
mysql

3306:

6、查看节点个数:

wsrep_node_name=node3306

default_storage_engine=Innodb

grant usage on *.* to ‘pxc-monitor’@’%’ identified by ‘pxc-monitor’;

useradd -M -g mysql -s /sbin/nologin/ -d /usr/local/mysql mysql

 

主节点增多账号:

wsrep_provider_options =
“gmcast.listen_addr=tcp://192.168.30.221:5030;”

#pxc on a single physical box

在一台机械上安装PXC

mkdir -p /data/mysql/mysql_4、启动主节点。3307/logs/binlog

wsrep_node_name=node3307

wsrep_sst_method=rsync

wsrep_4、启动主节点。sst_auth=sst:sampson

3308:

groupadd mysql

4、运行主节点:

                ②192.168.30.221:3307     cluster_address:5030

chown -R mysql:mysql /usr/local/mysql

cd /usr/local/mysql

 

 

4、启动主节点。 

 

wsrep_cluster_address=’gcomm://192.168.30.221:4030,192.168.30.221:6030′

 

wsrep_sst_method=rsync

wsrep_provider=/usr/local/mysql/lib/libgalera_smm.so

innodb_4、启动主节点。locks_unsafe_for_binlog=1

+——————–+——-+

 

mysql> show global status like ‘wsrep_cluster_size’;

tar zxvf
/data/src/Percona-XtraDB-Cluster-5.7.17-rel13-29.20.3.Linux.x86_64.ssl101.tar.gz

翻占卜应的error.log,能看出

wsrep_sst_method=rsync

 

 

yum -y install rsync

wsrep_node_incoming_address=192.168.30.221

PXC节点:①192.168.30.221:3306     cluster_address:4030

mkdir -p /data/mysql/mysql_3307/{data,logs,tmp}

则代表node运转并步向cluster集群成功。

bin/mysqld_safe –defaults-file= /data/mysql/mysql_3306/my.cnf
–wsrep-new-cluster

mkdir -p /data/mysql/mysql_3306/{data,logs,tmp}

innodb_autoinc_lock_mode=2

 

wsrep_cluster_address=’gcomm://192.168.30.221:5030,192.168.30.221:6030′

innodb_locks_unsafe_for_binlog=1

wsrep_cluster_name=pxc_sampson

wsrep_slave_threads=2

wsrep_node_incoming_address=192.168.30.221

3307:

default_storage_engine=Innodb

mkdir -p /data/mysql/mysql_3308/{data,logs,tmp}

+——————–+——-+


[Note] WSREP: New cluster view: global state:
f71affa6-2b55-11e7-b8db-6afbe908670d:7, view# 1: Primary, number of
nodes: 1, my index: 0, protocol version 3

 

注:参谋网站

innodb_autoinc_lock_mode=2

wsrep_sst_receive_address=192.168.30.221:6020

2、新建文件夹请授权:

wsrep_node_name=node3308

wsrep_provider=/usr/local/mysql/lib/libgalera_smm.so

grant all privileges on *.* to ‘sst’@’%’ identified by ‘sampson’;

+——————–+——-+

相关文章