Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install and use the PXC5.7 version cluster

2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly shows you "PXC5.7 version cluster how to install and use", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "PXC5.7 version cluster how to install and use" this article.

Environment introduction:

Pxc has three nodes:

192.168.1.6 test06

192.168.1.7 test07

192.168.1.8 test08

Operating system version: CentOS release 6.8 (Final)

The following basic packages need to be installed before installing pxc:

# yum install-y socat perl-IO-Socket-SSL.noarch perl-DBD-MySQL.x86_64 perl-Time-HiRes openssl openssl-devel

Turn off the firewall:

# service iptables stop

Yum installation:

[root@test06 /] # yum install http://www.percona.com/downloads/percona-release/redhat/0.1-4/percona-release-0.1-4.noarch.rpm

Loaded plugins: fastestmirror

Setting up Install Process

Percona-release-0.1-4.noarch.rpm | 6.4 kB 00:00

Examining / var/tmp/yum-root-Km06K3/percona-release-0.1-4.noarch.rpm: percona-release-0.1-4.noarch

Marking / var/tmp/yum-root-Km06K3/percona-release-0.1-4.noarch.rpm to be installed

Loading mirror speeds from cached hostfile

* base: mirrors.huaweicloud.com

* epel: mirror01.idc.hinet.net

* extras: mirrors.huaweicloud.com

* updates: mirrors.huaweicloud.com

Resolving Dependencies

-> Running transaction check

-> Package percona-release.noarch 0RU 0.1-4 will be installed

-> Finished Dependency Resolution

Dependencies Resolved

=

Package Arch Version Repository Size

=

Installing:

Percona-release noarch 0.1-4 / percona-release-0.1-4.noarch 5.8k

Transaction Summary

=

Install 1 Package (s)

Total size: 5.8 k

Installed size: 5.8 k

Is this ok [y/N]: y

Downloading Packages:

Running rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

Running Transaction

Installing: percona-release-0.1-4.noarch 1 Compact 1

Verifying: percona-release-0.1-4.noarch 1 Compact 1

Installed:

Percona-release.noarch 0RO 0.1-4

Complete!

[root@test data] # yum list | grep Percona-XtraDB-Cluster-57

Percona-XtraDB-Cluster-57.x86_64 5.7.23-31.31.2.el6 percona-release-x86_64

Percona-XtraDB-Cluster-57-debuginfo.x86_64 5.7.23-31.31.2.el6 percona-release-x86_64

[root@test data] # yum install Percona-XtraDB-Cluster-57

Loaded plugins: fastestmirror

Setting up Install Process

Loading mirror speeds from cached hostfile

* base: mirrors.huaweicloud.com

* epel: mirror01.idc.hinet.net

* extras: mirrors.huaweicloud.com

* updates: mirrors.huaweicloud.com

Resolving Dependencies

-> Running transaction check

-> Package Percona-XtraDB-Cluster-57.x86_64 0RU 5.7.23-31.31.2.el6 will be installed

-- > Processing Dependency: Percona-XtraDB-Cluster-server-57 = 5.7.23-31.31.2.el6 for package: Percona-XtraDB-Cluster-57-5.7.23-31.31.2.el6.x86_64

-- > Processing Dependency: Percona-XtraDB-Cluster-client-57 = 5.7.23-31.31.2.el6 for package: Percona-XtraDB-Cluster-57-5.7.23-31.31.2.el6.x86_64

-> Running transaction check

-> Package Percona-XtraDB-Cluster-client-57.x86_64 0RU 5.7.23-31.31.2.el6 will be installed

-> Package Percona-XtraDB-Cluster-server-57.x86_64 0RU 5.7.23-31.31.2.el6 will be installed

-- > Processing Dependency: Percona-XtraDB-Cluster-shared-57 = 5.7.23-31.31.2.el6 for package: Percona-XtraDB-Cluster-server-57-5.7.23-31.31.2.el6.x86_64

-- > Processing Dependency: lsof for package: Percona-XtraDB-Cluster-server-57-5.7.23-31.31.2.el6.x86_64

-- > Processing Dependency: qpress for package: Percona-XtraDB-Cluster-server-57-5.7.23-31.31.2.el6.x86_64

-> Running transaction check

-> Package Percona-XtraDB-Cluster-shared-57.x86_64 0RU 5.7.23-31.31.2.el6 will be installed

-> Package lsof.x86_64 0RU 4.82-5.el6 will be installed

-- > Package qpress.x86_64 0:11-1.el6 will be installed

-> Finished Dependency Resolution

Dependencies Resolved

=

Package Arch Version Repository Size

=

Installing:

Percona-XtraDB-Cluster-57 x8631 64 5.7.23-31.31.2.el6 percona-release-x86_64 27k

Installing for dependencies:

Percona-XtraDB-Cluster-client-57 x8631 64 5.7.23-31.31.2.el6 percona-release-x86_64 8.6m

Percona-XtraDB-Cluster-server-57 x8631 64 5.7.23-31.31.2.el6 percona-release-x86_64 53 M

Percona-XtraDB-Cluster-shared-57 x8631 64 5.7.23-31.31.2.el6 percona-release-x86_64 880k

Lsof x86164 4.82-5.el6 base 324k

Qpress x8634 64 11-1.el6 percona-release-x86_64 30k

Transaction Summary

=

Install 6 Package (s)

Total download size: 63 M

Installed size: 64 M

Is this ok [y/N]: y

Downloading Packages:

(1ap6): Percona-XtraDB-Cluster-57-5.7.23-31.31.2.el6.x86_64.rpm | 27 kB 00:00

(2can6): Percona-XtraDB-Cluster-client-57-5.7.23-31.31.2.el6.x86_64.rpm | 8.6 MB 03:26

(3can6): Percona-XtraDB-Cluster-server-57-5.7.23-31.31.2.el6.x86_64.rpm | 53 MB 12:57

(4can6): Percona-XtraDB-Cluster-shared-57-5.7.23-31.31.2.el6.x86_64.rpm | 880 kB 00:13

(5can6): lsof-4.82-5.el6.x86_64.rpm | 324 kB 00:00

(6ap6): qpress-11-1.el6.x86_64.rpm | 30 kB 00:00

- --

Total 64 kB/s | 63 MB 16:43

Running rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

Running Transaction

Installing: Percona-XtraDB-Cluster-client-57-5.7.23-31.31.2.el6.x86_64 1max 6

Installing: Percona-XtraDB-Cluster-shared-57-5.7.23-31.31.2.el6.x86_64 2max 6

Installing: lsof-4.82-5.el6.x86_64 3 Compact 6

Installing: qpress-11-1.el6.x86_64 4 Compact 6

Giving mysqld 5 seconds to exit nicely

Installing: Percona-XtraDB-Cluster-server-57-5.7.23-31.31.2.el6.x86_64 5ax 6

-

* The suggested mysql options and settings are in / etc/percona-xtradb-cluster.conf.d/mysqld.cnf

* If you want to use mysqld.cnf as default configuration file please make backup of / etc/my.cnf

* Once it is done please execute the following commands:

Rm-rf / etc/my.cnf

Update-alternatives-install / etc/my.cnf my.cnf "/ etc/percona-xtradb-cluster.cnf" 200

-

Percona XtraDB Cluster is distributed with several useful UDFs from Percona Toolkit.

Run the following commands to create these functions:

Mysql-e "CREATE FUNCTION fnv1a_64 RETURNS INTEGER SONAME 'libfnv1a_udf.so'"

Mysql-e "CREATE FUNCTION fnv_64 RETURNS INTEGER SONAME 'libfnv_udf.so'"

Mysql-e "CREATE FUNCTION murmur_hash RETURNS INTEGER SONAME 'libmurmur_udf.so'"

See http://www.percona.com/doc/percona-server/5.7/management/udf_percona_toolkit.html for more details

Installing: Percona-XtraDB-Cluster-57-5.7.23-31.31.2.el6.x86_64 6 hand 6

Verifying: Percona-XtraDB-Cluster-client-57-5.7.23-31.31.2.el6.x86_64 1max 6

Verifying: qpress-11-1.el6.x86_64 2 Compact 6

Verifying: lsof-4.82-5.el6.x86_64 3 Compact 6

Verifying: Percona-XtraDB-Cluster-shared-57-5.7.23-31.31.2.el6.x86_64 4ax 6

Verifying: Percona-XtraDB-Cluster-57-5.7.23-31.31.2.el6.x86_64 5ax 6

Verifying: Percona-XtraDB-Cluster-server-57-5.7.23-31.31.2.el6.x86_64 6 hand 6

Installed:

Percona-XtraDB-Cluster-57.x86_64 0RO 5.7.23-31.31.2.el6

Dependency Installed:

Percona-XtraDB-Cluster-client-57.x86_64 0RO 5.7.23-31.31.2.el6 Percona-XtraDB-Cluster-server-57.x86_64 0RO 5.7.23-31.31.2.el6

Percona-XtraDB-Cluster-shared-57.x86_64 0RO 5.7.23-31.31.2.el6 lsof.x86_64 0RO 4.82-5.el6

Qpress.x86_64 0:11-1.el6

Complete!

Master Node profile:

# vi / etc/my.cnf

[mysqld]

Server-id=216

Pid-file=/var/run/mysqld/mysqld.pid

Log-error=/var/log/mysqld.log

Datadir = / data/mysql/data

Log_error=/data/mysql/log/mysqld.err

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

Wsrep_cluster_address=gcomm://192.168.1.6192.168.1.7192.168.1.8

Wsrep_node_name=pxc1

Wsrep_node_address=192.168.1.6

Wsrep_slave_threads=2

Binlog_format=ROW

Default_storage_engine=InnoDB

Innodb_autoinc_lock_mode=2

Wsrep_cluster_name=pxc

Wsrep_sst_auth=sst:dsf

Wsrep_sst_method=xtrabackup-v2

Pxc_strict_mode=ENFORCING

~

Start the primary node pxc:

# / etc/init.d/mysql bootstrap-pxc

Bootstrapping PXC (Percona XtraDB Cluster) Initializing MySQ [OK] se:

Starting MySQL (Percona XtraDB Cluster). SUCCESS!

Startup log:

2018-10-24T08:48:02.766241Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use-explicit_defaults_for_timestamp server option (see documentation for more details).

2018-10-24T08:48:02.766340Z 0 [Warning] WSREP: Node is running in bootstrap/initialize mode. Disabling pxc_strict_mode checks

2018-10-24T08:48:02.766386Z 0 [ERROR] Can't find error-message file'/ usr/local/Percona-XtraDB-Cluster-5.7.23-rel23-31.31.2.Linux.x86x64.ssl101 Check error-message file location and 'lc-messages-dir' configuration directive.

2018-10-24T08:48:03.376671Z 0 [Warning] InnoDB: New log files created, LSN=45790

2018-10-24T08:48:04.643073Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.

2018-10-24T08:48:05.322164Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 85ecb885-d769-11e8-ba96-5254005688c2.

2018-10-24T08:48:05.783587Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.

2018-10-24T08:48:05.972121Z 0 [Warning] CA certificate ca.pem is self signed.

2018-10-24T08:48:06.114041Z 1 [Note] A temporary password is generated for root@localhost: YvYNbTiIp3 00000000-0000-0000-0000-0000000000Rue Murray 1

2018-10-24T08:48:15.973323Z 0 [Note] WSREP: Assign initial position for certification:-1, protocol version:-1

2018-10-24T08:48:15.973373Z 0 [Note] WSREP: Preparing to initiate SST/IST

2018-10-24T08:48:15.973387Z 0 [Note] WSREP: Starting replication

2018-10-24T08:48:15.973409Z 0 [Note] WSREP: Setting initial position to 00000000-0000-0000-0000-0000000000Rue 1

2018-10-24T08:48:15.973623Z 0 [Note] WSREP: Using CRC-32C for message checksums.

2018-10-24T08:48:15.973770Z 0 [Note] WSREP: gcomm thread scheduling priority set to other:0

2018-10-24T08:48:15.973897Z 0 [Warning] WSREP: Fail to access the file (/ data/mysql/data//gvwstate.dat) error (No such file or directory). It is possible if node is booting for first time or re-booting after a graceful shutdown

2018-10-24T08:48:15.973920Z 0 [Note] WSREP: Restoring primary-component from disk failed. Either node is booting for first time or re-booting after a graceful shutdown

2018-10-24T08:48:15.974649Z 0 [Note] WSREP: GMCast version 0

2018-10-24T08:48:15.974955Z 0 [Note] WSREP: (8c460ee0, 'tcp://0.0.0.0:4567') listening at tcp://0.0.0.0:4567

2018-10-24T08:48:15.974982Z 0 [Note] WSREP: (8c460ee0, 'tcp://0.0.0.0:4567') multicast:, ttl: 1

2018-10-24T08:48:15.975321Z 0 [Note] WSREP: EVS version 0

2018-10-24T08:48:15.975417Z 0 [Note] WSREP: gcomm: bootstrapping new group 'pxc'

2018-10-24T08:48:15.975478Z 0 [Note] WSREP: start_prim is enabled, turn off pc_recovery

2018-10-24T08:48:15.976320Z 0 [Note] WSREP: Node 8c460ee0 state primary

2018-10-24T08:48:15.976384Z 0 [Note] WSREP: Current view of cluster as seen by this node

View (view_id (PRIM,8c460ee0,1))

Memb {

8c460ee0,0

}

Joined {

}

Left {

}

Partitioned {

}

)

2018-10-24T08:48:15.976410Z 0 [Note] WSREP: Save the discovered primary-component to disk

2018-10-24T08:48:15.977468Z 0 [Note] WSREP: discarding pending addr without UUID: tcp://192.168.1.6:4567

2018-10-24T08:48:15.977497Z 0 [Note] WSREP: discarding pending addr proto entry 0x3033460

2018-10-24T08:48:15.977534Z 0 [Note] WSREP: discarding pending addr without UUID: tcp://192.168.1.7:4567

2018-10-24T08:48:15.977554Z 0 [Note] WSREP: discarding pending addr proto entry 0x303bc40

2018-10-24T08:48:15.977567Z 0 [Note] WSREP: discarding pending addr without UUID: tcp://192.168.1.8:4567

2018-10-24T08:48:15.977581Z 0 [Note] WSREP: discarding pending addr proto entry 0x3044430

2018-10-24T08:48:15.977612Z 0 [Note] WSREP: gcomm: connected

2018-10-24T08:48:15.977689Z 0 [Note] WSREP: Shifting CLOSED-> OPEN (TO: 0)

2018-10-24T08:48:15.978163Z 0 [Note] WSREP: New COMPONENT: primary = yes, bootstrap = no, my_idx = 0, memb_num = 1

2018-10-24T08:48:15.978371Z 0 [Note] WSREP: Waiting for SST/IST to complete.

2018-10-24T08:48:15.979995Z 0 [Note] WSREP: Starting new group from scratch: 8c46dd3d-d769-11e8-84c6-d6aac3977406

2018-10-24T08:48:15.980513Z 0 [Note] WSREP: STATE_EXCHANGE: sent state UUID: 8c46fb53-d769-11e8-ae76-f615ec681929

2018-10-24T08:48:15.980543Z 0 [Note] WSREP: STATE EXCHANGE: sent state msg: 8c46fb53-d769-11e8-ae76-f615ec681929

2018-10-24T08:48:15.980550Z 0 [Note] WSREP: STATE EXCHANGE: got state msg: 8c46fb53-d769-11e8-ae76-f615ec681929 from 0 (pxc1)

2018-10-24T08:48:15.980558Z 0 [Note] WSREP: Quorum results:

Version = 4

Component = PRIMARY

Conf_id = 0

Members = 1 to 1 (primary/total)

Act_id = 0

Last_appl. =-1

Protocols = 0tic9thumb 3 (gcs/repl/appl)

Group UUID = 8c46dd3d-d769-11e8-84c6-d6aac3977406

2018-10-24T08:48:15.980566Z 0 [Note] WSREP: Flow-control interval: [100,100]

2018-10-24T08:48:15.980570Z 0 [Note] WSREP: Trying to continue unpaused monitor

2018-10-24T08:48:15.980584Z 0 [Note] WSREP: Restored state OPEN-> JOINED (0)

0-10-24T08:48:15.980611Z 0 [Note] WSREP: Member 2018 (pxc1) synced with group.

2018-10-24T08:48:15.980625Z 0 [Note] WSREP: Shifting JOINED-> SYNCED (TO: 0)

2018-10-24T08:48:15.980665Z 2 [Note] WSREP: REPL Protocols: 9 (4,2)

2018-10-24T08:48:15.980704Z 2 [Note] WSREP: New cluster view: global state: 8c46dd3d-d769-11e8-84c6-d6aac3977406:0, view# 1: Primary, number of nodes: 1, my index: 0, protocol version 3

2018-10-24T08:48:15.980726Z 2 [Note] WSREP: Setting wsrep_ready to true

2018-10-24T08:48:15.980779Z 0 [Note] WSREP: SST complete, seqno: 0

2018-10-24T08:48:15.982216Z 0 [Note] InnoDB: PUNCH HOLE support available

2018-10-24T08:48:15.982247Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

2018-10-24T08:48:15.982272Z 0 [Note] InnoDB: Uses event mutexes

2018-10-24T08:48:15.982278Z 0 [Note] InnoDB: GCC builtin _ _ sync_synchronize () is used for memory barrier

2018-10-24T08:48:15.982283Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3

2018-10-24T08:48:15.982287Z 0 [Note] InnoDB: Using Linux native AIO

2018-10-24T08:48:15.982520Z 0 [Note] InnoDB: Number of pools: 1

2018-10-24T08:48:15.982646Z 0 [Note] InnoDB: Not using CPU crc32 instructions

2018-10-24T08:48:15.983985Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128m, instances = 1, chunk size = 128m

2018-10-24T08:48:15.993069Z 0 [Note] InnoDB: Completed initialization of buffer pool

2018-10-24T08:48:15.998464Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority ().

2018-10-24T08:48:16.009838Z 0 [Note] InnoDB: Crash recovery did not find the parallel doublewrite buffer at / data/mysql/data/xb_doublewrite

2018-10-24T08:48:16.013640Z 0 [Note] InnoDB: Highest supported file format is Barracuda.

2018-10-24T08:48:16.033651Z 0 [Note] InnoDB: Created parallel doublewrite buffer at / data/mysql/data/xb_doublewrite, size 3932160 bytes

2018-10-24T08:48:16.042078Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables

2018-10-24T08:48:16.042156Z 0 [Note] InnoDB: Setting file'. / ibtmp1' size to 12 MB. Physically writing the file full; Please wait...

2018-10-24T08:48:16.057643Z 0 [Note] InnoDB: File'. / ibtmp1' size is now 12 MB.

2018-10-24T08:48:16.058376Z 0 [Note] InnoDB: 96 redo rollback segment (s) found. 96 redo rollback segment (s) are active.

2018-10-24T08:48:16.058414Z 0 [Note] InnoDB: 32 non-redo rollback segment (s) are active.

2018-10-24T08:48:16.062360Z 0 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.7.23-rel23 started; log sequence number 2594622

2018-10-24T08:48:16.064275Z 0 [Note] InnoDB: Loading buffer pool (s) from / data/mysql/data/ib_buffer_pool

2018-10-24T08:48:16.064499Z 0 [Note] Plugin 'FEDERATED' is disabled.

2018-10-24T08:48:16.074083Z 0 [Note] InnoDB: Buffer pool (s) load completed at 181024 16:48:16

2018-10-24T08:48:16.077060Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.

2018-10-24T08:48:16.077089Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.

2018-10-24T08:48:16.083947Z 0 [Warning] CA certificate ca.pem is self signed.

2018-10-24T08:48:16.084031Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.

2018-10-24T08:48:16.084142Z 0 [Note] Server hostname (bind-address):'*'; port: 3306

2018-10-24T08:48:16.084196Z 0 [Note] IPv6 is available.

2018-10-24T08:48:16.084219Z 0 [Note] -':: 'resolves to'::'

2018-10-24T08:48:16.084242Z 0 [Note] Server socket created on IP:':'.

2018-10-24T08:48:16.185509Z 0 [Note] Event Scheduler: Loaded 0 events

2018-10-24T08:48:16.187123Z 0 [Note] / usr/local/mysql/bin/mysqld: ready for connections.

Version: '5.7.23-31.31' socket:'/ tmp/mysql.sock' port: 3306 Percona XtraDB Cluster binary (GPL) 5.7.23-31.31, Revision f5578f0, wsrep_31.31

2018-10-24T08:48:16.203249Z 2 [Note] WSREP: Initialized wsrep sidno 2

Find the temporary password:

# cat mysqld.err | grep temporary

2018-10-24T08:48:06.114041Z 1 [Note] A temporary password is generated for root@localhost: YvYNbTiIp3\ s

ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

Mysql > alter user root@localhost identified by''

Query OK, 0 rows affected (0.01 sec)

Mysql > flush privileges

Query OK, 0 rows affected (0.00 sec)

Mysql > exit

Create a pxc sst account:

Mysql > create user sst@localhost identified by 'dsf'

Query OK, 0 rows affected (0.00 sec)

Mysql > grant all privileges on *. * to sst@localhost

Query OK, 0 rows affected (0.02 sec)

Mysql > flush privileges

Query OK, 0 rows affected (0.01 sec)

Second node:

[root@solr07 log] # cat / etc/my.cnf

[mysqld]

Pid-file=/var/run/mysqld/mysqld.pid

Log-error=/var/log/mysqld.log

Server-id=217

Datadir = / data/mysql/data

Log_error=/data/mysql/log/mysqld.err

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

Wsrep_provider=/usr/lib64/libgalera_smm.so

Wsrep_cluster_address=gcomm://192.168.1.6192.168.1.7192.168.1.8

Wsrep_node_name=pxc2

Wsrep_node_address=192.168.1.7

Wsrep_slave_threads=2

Binlog_format=ROW

Default_storage_engine=InnoDB

Innodb_autoinc_lock_mode=2

Wsrep_cluster_name=pxc

Wsrep_sst_auth=sst:dsf

Wsrep_sst_method=xtrabackup-v2

# wsrep_sst_method=mysqldump

Pxc_strict_mode=ENFORCING

Start:

# / etc/init.d/mysql start

ERROR! MySQL (Percona XtraDB Cluster) is not running, but lock file (/ var/lock/subsys/mysql) exists

Initializing MySQL database: [OK]

Starting MySQL (Percona XtraDB Cluster).. State transfer in progress, setting sleep higher

... SUCCESS!

Startup log:

2018-10-24T09:21:27.904734Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use-explicit_defaults_for_timestamp server option (see documentation for more details).

2018-10-24T09:21:27.904806Z 0 [Warning] WSREP: Node is running in bootstrap/initialize mode. Disabling pxc_strict_mode checks

2018-10-24T09:21:28.132131Z 0 [Warning] InnoDB: New log files created, LSN=45790

2018-10-24T09:21:28.167258Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.

2018-10-24T09:21:28.225899Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 2fbf9399-d76e-11e8-816f-52540001d3d4.

2018-10-24T09:21:28.227125Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.

2018-10-24T09:21:28.713696Z 0 [Warning] CA certificate ca.pem is self signed.

2018-10-24T09:21:28.761550Z 1 [Note] A temporary password is generated for root@localhost: soynlamI&8FY

2018-10-24T09:21:41.960201Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use-explicit_defaults_for_timestamp server option (see documentation for more details).

2018-10-24T09:21:41.964613Z 0 [Note] / usr/sbin/mysqld (mysqld 5.7.23-23-57) starting as process 21455.

2018-10-24T09:21:41.966960Z 0 [Note] WSREP: Setting wsrep_ready to false

2018-10-24T09:21:41.966985Z 0 [Note] WSREP: No pre-stored wsrep-start position found. Skipping position initialization.

2018-10-24T09:21:41.966999Z 0 [Note] WSREP: wsrep_load (): loading provider library'/ usr/lib64/libgalera_smm.so'

2018-10-24T09:21:41.971037Z 0 [Note] WSREP: wsrep_load (): Galera 3.31 (rf216443) by Codership Oy loaded successfully.

2018-10-24T09:21:41.971113Z 0 [Note] WSREP: CRC-32C: using "slicing-by-8" algorithm.

2018-10-24T09:21:41.971414Z 0 [Warning] WSREP: Could not open state file for reading:'/ data/mysql/data//grastate.dat'

2018-10-24T09:21:41.971438Z 0 [Warning] WSREP: No persistent state found. Bootstraping with default state

2018-10-24T09:21:41.971472Z 0 [Note] WSREP: Found saved state: 00000000-0000-0000-0000-000000000000 Raffle 1, safe_to_bootstrap: 1

2018-10-24T09:21:41.974016Z 0 [Note] WSREP: Passing config to GCS: base_dir = / data/mysql/data/; base_host = 192.168.1.7; base_port = 4567; cert.log_conflicts = no; debug = no; evs.auto_evict = 0; evs.delay_margin = PT1S; evs.delayed_keep_period = PT30S; evs.inactive_check_period = PT0.5S; evs.inactive_timeout = PT15S; evs.join_retrans_period = PT1S; evs.max_install_timeouts = 3 Evs.send_window = 10; evs.stats_report_period = PT1M; evs.suspect_timeout = PT5S; evs.user_send_window = 4; evs.view_forget_timeout = PT24H; gcache.dir = / data/mysql/data/; gcache.freeze_purge_at_seqno =-1; gcache.keep_pages_count = 0; gcache.keep_pages_size = 0; gcache.mem_size = 0; gcache.name = / data/mysql/data//galera.cache; gcache.page_size = 128m; gcache.recover = no Gcache.size = 128m; gcomm.thread_prio =; gcs.fc_debug = 0; gcs.fc_factor = 1; gcs.fc_limit = 100; gcs.fc_master_slave = no; gcs.max_packet_size = 64500; gcs.max_throttle = 0.25; gcs.recv_q_hard_limit = 9223372036854775807; gcs.recv_q_soft_limit = 0.25; gcs.sync_donor = no; gmcast.segment = 0; gmcast.version = 0; pc.announce_timeout = PT3S; pc.checksum = false Pc.ignore_quorum = false; pc.ignore_sb = false; pc.npvo = false; pc.recovery = 1; pc.version = 0; pc.wait_prim = true; pc.wait_prim_timeout = PT30S; pc.weight = 1; protonet.backend = asio; protonet.version = 0; repl.causal_read_timeout = PT30S; repl.commit_order = 3; repl.key_format = FLAT8; repl.max_ws_size = 2147483647; repl.proto_max = 9; socket.checksum = 2; socket.recv_buf_size = 212992

2018-10-24T09:21:42.015236Z 0 [Note] WSREP: GCache history reset: 00000000-0000-0000-0000-000000000000000000-0000000-0000-0000-0000-00000000000000

2018-10-24T09:21:42.016305Z 0 [Note] WSREP: Assign initial position for certification:-1, protocol version:-1

2018-10-24T09:21:42.016351Z 0 [Note] WSREP: Preparing to initiate SST/IST

2018-10-24T09:21:42.016367Z 0 [Note] WSREP: Starting replication

2018-10-24T09:21:42.016400Z 0 [Note] WSREP: Setting initial position to 00000000-0000-0000-0000-0000000000Rue 1

2018-10-24T09:21:42.016628Z 0 [Note] WSREP: Using CRC-32C for message checksums.

2018-10-24T09:21:42.016768Z 0 [Note] WSREP: gcomm thread scheduling priority set to other:0

2018-10-24T09:21:42.016894Z 0 [Warning] WSREP: Fail to access the file (/ data/mysql/data//gvwstate.dat) error (No such file or directory). It is possible if node is booting for first time or re-booting after a graceful shutdown

2018-10-24T09:21:42.016915Z 0 [Note] WSREP: Restoring primary-component from disk failed. Either node is booting for first time or re-booting after a graceful shutdown

2018-10-24T09:21:42.017551Z 0 [Note] WSREP: GMCast version 0

2018-10-24T09:21:42.017762Z 0 [Note] WSREP: (37f7ecae, 'tcp://0.0.0.0:4567') listening at tcp://0.0.0.0:4567

2018-10-24T09:21:42.017783Z 0 [Note] WSREP: (37f7ecae, 'tcp://0.0.0.0:4567') multicast:, ttl: 1

2018-10-24T09:21:42.018098Z 0 [Note] WSREP: EVS version 0

2018-10-24T09:21:42.018270Z 0 [Note] WSREP: gcomm: connecting to group 'pxc', peer' 192.168.1.6 gcomm gcomm '192.168.1.7 WSREP 192.168.1.8

2018-10-24T09:21:42.019829Z 0 [Note] WSREP: (37f7ecae, 'tcp://0.0.0.0:4567') connection established to 37f7ecae tcp://192.168.1.7:4567

2018-10-24T09:21:42.019867Z 0 [Warning] WSREP: (37f7ecae, 'tcp://0.0.0.0:4567') address' tcp://192.168.1.7:4567' points to own listening address, blacklisting

2018-10-24T09:21:42.020458Z 0 [Note] WSREP: (37f7ecae, 'tcp://0.0.0.0:4567') connection established to e9a1e0cb tcp://192.168.1.6:4567

2018-10-24T09:21:42.020517Z 0 [Note] WSREP: (37f7ecae, 'tcp://0.0.0.0:4567') turning message relay requesting on, nonlive peers:

2018-10-24T09:21:42.520282Z 0 [Note] WSREP: declaring e9a1e0cb at tcp://192.168.1.6:4567 stable

2018-10-24T09:21:42.521151Z 0 [Note] WSREP: Node e9a1e0cb state primary

2018-10-24T09:21:42.521698Z 0 [Note] WSREP: Current view of cluster as seen by this node

View (view_id (PRIM,37f7ecae,2))

Memb {

37f7ecae,0

E9a1e0cb,0

}

Joined {

}

Left {

}

Partitioned {

}

)

2018-10-24T09:21:42.521745Z 0 [Note] WSREP: Save the discovered primary-component to disk

2018-10-24T09:21:42.712361Z 0 [Note] WSREP: discarding pending addr without UUID: tcp://192.168.1.8:4567

2018-10-24T09:21:43.019199Z 0 [Note] WSREP: gcomm: connected

2018-10-24T09:21:43.019485Z 0 [Note] WSREP: Shifting CLOSED-> OPEN (TO: 0)

2018-10-24T09:21:43.019588Z 0 [Note] WSREP: New COMPONENT: primary = yes, bootstrap = no, my_idx = 0, memb_num = 2

2018-10-24T09:21:43.019885Z 0 [Note] WSREP: Waiting for SST/IST to complete.

2018-10-24T09:21:43.020289Z 0 [Note] WSREP: STATE_EXCHANGE: sent state UUID: 3890ec7c-d76e-11e8-ae62-57d35f50d7d7

2018-10-24T09:21:43.020881Z 0 [Note] WSREP: STATE EXCHANGE: sent state msg: 3890ec7c-d76e-11e8-ae62-57d35f50d7d7

2018-10-24T09:21:43.021558Z 0 [Note] WSREP: STATE EXCHANGE: got state msg: 3890ec7c-d76e-11e8-ae62-57d35f50d7d7 from 0 (pxc2)

2018-10-24T09:21:43.022228Z 0 [Note] WSREP: STATE EXCHANGE: got state msg: 3890ec7c-d76e-11e8-ae62-57d35f50d7d7 from 1 (pxc1)

2018-10-24T09:21:43.022260Z 0 [Note] WSREP: Quorum results:

Version = 4

Component = PRIMARY

Conf_id = 1

Members = 1ax 2 (primary/total)

Act_id = 5

Last_appl. =-1

Protocols = 0tic9thumb 3 (gcs/repl/appl)

Group UUID = 8c46dd3d-d769-11e8-84c6-d6aac3977406

2018-10-24T09:21:43.022284Z 0 [Note] WSREP: Flow-control interval: [141,141]

2018-10-24T09:21:43.022295Z 0 [Note] WSREP: Trying to continue unpaused monitor

2018-10-24T09:21:43.022305Z 0 [Note] WSREP: Shifting OPEN-> PRIMARY (TO: 5)

2018-10-24T09:21:43.022408Z 2 [Note] WSREP: State transfer required:

Group state: 8c46dd3d-d769-11e8-84c6-d6aac3977406:5

Local state: 00000000-0000-0000-0000-00000000000015

2018-10-24T09:21:43.022453Z 2 [Note] WSREP: REPL Protocols: 9 (4,2)

2018-10-24T09:21:43.022466Z 2 [Note] WSREP: New cluster view: global state: 8c46dd3d-d769-11e8-84c6-d6aac3977406:5, view# 2: Primary, number of nodes: 2, my index: 0, protocol version 3

2018-10-24T09:21:43.022496Z 2 [Note] WSREP: Setting wsrep_ready to true

2018-10-24T09:21:43.022509Z 2 [Warning] WSREP: Gap in state sequence. Need state transfer.

2018-10-24T09:21:43.022521Z 2 [Note] WSREP: Setting wsrep_ready to false

2018-10-24T09:21:43.022682Z 0 [Note] WSREP: Initiating SST/IST transfer on JOINER side (wsrep_sst_xtrabackup-v2-- role 'joiner'-- address' 192.168.1.7'-- datadir'/ data/mysql/data/'-- defaults-file'/ etc/my.cnf'-- defaults-group-suffix''--parent '21455'-mysqld-version' 5.7.23-23-57'')

2018-10-24T09:21:43.139992Z WSREP_SST: [WARNING] wsrep_node_address or wsrep_sst_receive_address not set. Consider setting them if SST fails.

2018-10-24T09:21:43.600512Z 2 [Note] WSREP: Prepared SST/IST request: xtrabackup-v2 | 192.168.1.7:4444/xtrabackup_sst//1

2018-10-24T09:21:43.600557Z 2 [Note] WSREP: Auto Increment Offset/Increment re-align with cluster membership change (Offset: 1-> 1) (Increment: 1-> 2)

2018-10-24T09:21:43.600569Z 2 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.

2018-10-24T09:21:43.600600Z 2 [Note] WSREP: Assign initial position for certification: 5, protocol version: 4

2018-10-24T09:21:43.600682Z 0 [Note] WSREP: Service thread queue flushed.

2018-10-24T09:21:43.600747Z 2 [Note] WSREP: Check if state gap can be serviced using IST

2018-10-24T09:21:43.600779Z 2 [Note] WSREP: Local UUID: 00000000-0000-0000-0000-000000000000! = Group UUID: 8c46dd3d-d769-11e8-84c6-d6aac3977406

2018-10-24T09:21:43.600834Z 2 [Note] WSREP: State gap can't be serviced using IST. Switching to SST

2018-10-24T09:21:43.600859Z 2 [Note] WSREP: Failed to prepare for incremental state transfer: Local state UUID (00000000-0000-0000-0000-000000000000) does not match group state UUID (8c46dd3d-d769-11e8-84c6-d6aac3977406): 1 (Operation not permitted)

At galera/src/replicator_str.cpp:prepare_for_IST (): 538. IST will be unavailable.

0-10-24T09:21:43.601680Z 0 [Note] WSREP: Member 2018 (pxc2) requested state transfer from'* any*'. Selected 1.0 (pxc1) (SYNCED) as donor.

2018-10-24T09:21:43.601703Z 0 [Note] WSREP: Shifting PRIMARY-> JOINER (TO: 5)

2018-10-24T09:21:43.601744Z 2 [Note] WSREP: Requesting state transfer: success, donor: 1

2018-10-24T09:21:43.601769Z 2 [Note] WSREP: GCache history reset: 00000000-0000-0000-0000-0000000000000000 8c46dd3d-d769-11e8-84c6-d6aac3977406:5

2018-10-24T09:21:43.977125Z WSREP_SST: [INFO] Proceeding with SST.

2018-10-24T09:21:44.020194Z WSREP_SST: [INFO] .waiting for SST streaming to complete!

2018-10-24T09:21:45.519726Z 0 [Note] WSREP: (37f7ecae, 'tcp://0.0.0.0:4567') turning message relay requesting off

2018-10-24T09:22:00.495213Z 0 [Note] WSREP: 1 (pxc1): State transfer to 0 (pxc2) complete.

0-10-24T09:22:00.495796Z 0 [Note] WSREP: Member 2018 (pxc1) synced with group.

2018-10-24T09:22:01.309046Z WSREP_SST: [INFO] Preparing the backup at / data/mysql/data//.sst

2018-10-24T09:22:04.853587Z WSREP_SST: [INFO] Moving the backup to / data/mysql/data/

2018-10-24T09:22:04.970909Z WSREP_SST: [INFO] Galera co-ords from recovery: 8c46dd3d-d769-11e8-84c6-d6aac3977406:5

2018-10-24T09:22:04.984305Z 0 [Note] WSREP: SST complete, seqno: 5

2018-10-24T09:22:04.985890Z 0 [Note] InnoDB: PUNCH HOLE support available

2018-10-24T09:22:04.985922Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

2018-10-24T09:22:04.985929Z 0 [Note] InnoDB: Uses event mutexes

2018-10-24T09:22:04.985945Z 0 [Note] InnoDB: GCC builtin _ _ sync_synchronize () is used for memory barrier

2018-10-24T09:22:04.985950Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3

2018-10-24T09:22:04.985955Z 0 [Note] InnoDB: Using Linux native AIO

2018-10-24T09:22:04.986233Z 0 [Note] InnoDB: Number of pools: 1

2018-10-24T09:22:04.986376Z 0 [Note] InnoDB: Not using CPU crc32 instructions

2018-10-24T09:22:04.988080Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128m, instances = 1, chunk size = 128m

2018-10-24T09:22:04.992104Z 0 [Note] InnoDB: Completed initialization of buffer pool

2018-10-24T09:22:04.994670Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority ().

2018-10-24T09:22:05.006381Z 0 [Note] InnoDB: Crash recovery did not find the parallel doublewrite buffer at / data/mysql/data/xb_doublewrite

2018-10-24T09:22:05.007329Z 0 [Note] InnoDB: Highest supported file format is Barracuda.

2018-10-24T09:22:05.022205Z 0 [Note] InnoDB: Created parallel doublewrite buffer at / data/mysql/data/xb_doublewrite, size 3932160 bytes

2018-10-24T09:22:05.033680Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"

2018-10-24T09:22:05.033707Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables

2018-10-24T09:22:05.033744Z 0 [Note] InnoDB: Setting file'. / ibtmp1' size to 12 MB. Physically writing the file full; Please wait...

2018-10-24T09:22:05.049824Z 0 [Note] InnoDB: File'. / ibtmp1' size is now 12 MB.

2018-10-24T09:22:05.050835Z 0 [Note] InnoDB: 96 redo rollback segment (s) found. 96 redo rollback segment (s) are active.

2018-10-24T09:22:05.050865Z 0 [Note] InnoDB: 32 non-redo rollback segment (s) are active.

2018-10-24T09:22:05.051845Z 0 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.7.23-23 started; log sequence number 2596392

2018-10-24T09:22:05.052441Z 0 [Note] InnoDB: Loading buffer pool (s) from / data/mysql/data/ib_buffer_pool

2018-10-24T09:22:05.052998Z 0 [Note] Plugin 'FEDERATED' is disabled.

2018-10-24T09:22:05.062214Z 0 [Note] InnoDB: Buffer pool (s) load completed at 181024 17:22:05

2018-10-24T09:22:05.065451Z 0 [Note] Salting uuid generator variables, current_pid: 21455, server_start_time: 1540372901, bytes_sent: 0

2018-10-24T09:22:05.065530Z 0 [Note] Generated uuid: '45b4dc30-d76e-11e8-8a3bMur52540001d3d4, server_start_time: 6039045626867518836, bytes_sent: 49147200

2018-10-24T09:22:05.065565Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 45b4dc30-d76e-11e8-8a3b-52540001d3d4.

2018-10-24T09:22:05.067396Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.

2018-10-24T09:22:05.067427Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.

2018-10-24T09:22:05.074014Z 0 [Warning] CA certificate ca.pem is self signed.

2018-10-24T09:22:05.074098Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.

2018-10-24T09:22:05.074249Z 0 [Note] Server hostname (bind-address):'*'; port: 3306

2018-10-24T09:22:05.074305Z 0 [Note] IPv6 is available.

2018-10-24T09:22:05.074328Z 0 [Note] -':: 'resolves to'::'

2018-10-24T09:22:05.074360Z 0 [Note] Server socket created on IP:':'.

2018-10-24T09:22:05.083820Z 0 [Note] Event Scheduler: Loaded 0 events

2018-10-24T09:22:05.084002Z 0 [Note] WSREP: Signalling provider to continue on SST completion.

2018-10-24T09:22:05.084035Z 0 [Note] WSREP: Initialized wsrep sidno 2

2018-10-24T09:22:05.084075Z 0 [Note] WSREP: SST received: 8c46dd3d-d769-11e8-84c6-d6aac3977406:5

2018-10-24T09:22:05.084379Z 0 [Note] / usr/sbin/mysqld: ready for connections.

Version: '5.7.23-23-57' socket:' / var/lib/mysql/mysql.sock' port: 3306 Percona XtraDB Cluster (GPL), Release rel23, Revision f5578f0, WSREP version 31.31, wsrep_31.31

0-10-24T09:22:05.086648Z 0 [Note] WSREP: 0 (pxc2): State transfer from 2018 (pxc1) complete.

2018-10-24T09:22:05.086680Z 0 [Note] WSREP: SST leaving flow control

2018-10-24T09:22:05.086686Z 0 [Note] WSREP: Shifting JOINER-> JOINED (TO: 5)

0-10-24T09:22:05.087098Z 0 [Note] WSREP: Member 2018 (pxc2) synced with group.

2018-10-24T09:22:05.087140Z 0 [Note] WSREP: Shifting JOINED-> SYNCED (TO: 5)

2018-10-24T09:22:05.087188Z 2 [Note] WSREP: Synchronized with group, ready for connections

2018-10-24T09:22:05.087209Z 2 [Note] WSREP: Setting wsrep_ready to true

2018-10-24T09:22:05.087223Z 2 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.

[root@solr07 log] #

The third node profile:

# vi / etc/my.cnf

[mysqld]

Pid-file=/var/run/mysqld/mysqld.pid

Log-error=/var/log/mysqld.log

Server-id=218

# basedir = / usr/local/mysql

Datadir = / data/mysql/data

Log_error=/data/mysql/log/mysqld.err

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

Wsrep_provider=/usr/lib64/libgalera_smm.so

Wsrep_cluster_address=gcomm://192.168.1.6192.168.1.7192.168.1.8

Wsrep_node_name=pxc3

Wsrep_node_address=192.168.1.8

Wsrep_slave_threads=2

Binlog_format=ROW

Default_storage_engine=InnoDB

Innodb_autoinc_lock_mode=2

Wsrep_cluster_name=pxc

Wsrep_sst_auth=sst:dsf

Wsrep_sst_method=xtrabackup-v2

Pxc_strict_mode=ENFORCING

# / etc/init.d/mysql start

Initializing MySQL database: [OK]

Starting MySQL (Percona XtraDB Cluster).. State transfer in progress, setting sleep higher

... SUCCESS!

Startup log file contents:

2018-10-25T00:37:23.339703Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use-explicit_defaults_for_timestamp server option (see documentation for more details).

2018-10-25T00:37:23.339800Z 0 [Warning] WSREP: Node is running in bootstrap/initialize mode. Disabling pxc_strict_mode checks

2018-10-25T00:37:28.239438Z 0 [Warning] InnoDB: New log files created, LSN=45790

2018-10-25T00:37:28.454670Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.

2018-10-25T00:37:28.517289Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 26a2823b-d7ee-11e8-b25c-52540012a8a2.

2018-10-25T00:37:28.518535Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.

2018-10-25T00:37:28.638866Z 0 [Warning] CA certificate ca.pem is self signed.

2018-10-25T00:37:28.873076Z 1 [Note] A temporary password is generated for root@localhost: QA-vwoqsB7V+

2018-10-25T00:37:37.582900Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use-explicit_defaults_for_timestamp server option (see documentation for more details).

2018-10-25T00:37:37.584720Z 0 [Note] / usr/sbin/mysqld (mysqld 5.7.23-23-57) starting as process 19275.

2018-10-25T00:37:37.587168Z 0 [Note] WSREP: Setting wsrep_ready to false

2018-10-25T00:37:37.587197Z 0 [Note] WSREP: No pre-stored wsrep-start position found. Skipping position initialization.

2018-10-25T00:37:37.587212Z 0 [Note] WSREP: wsrep_load (): loading provider library'/ usr/lib64/libgalera_smm.so'

2018-10-25T00:37:37.591528Z 0 [Note] WSREP: wsrep_load (): Galera 3.31 (rf216443) by Codership Oy loaded successfully.

2018-10-25T00:37:37.591602Z 0 [Note] WSREP: CRC-32C: using "slicing-by-8" algorithm.

2018-10-25T00:37:37.591929Z 0 [Warning] WSREP: Could not open state file for reading:'/ data/mysql/data//grastate.dat'

2018-10-25T00:37:37.591955Z 0 [Warning] WSREP: No persistent state found. Bootstraping with default state

2018-10-25T00:37:37.591995Z 0 [Note] WSREP: Found saved state: 00000000-0000-0000-0000-000000000000 Raffle 1, safe_to_bootstrap: 1

2018-10-25T00:37:37.602759Z 0 [Note] WSREP: Passing config to GCS: base_dir = / data/mysql/data/; base_host = 192.168.1.8; base_port = 4567; cert.log_conflicts = no; debug = no; evs.auto_evict = 0; evs.delay_margin = PT1S; evs.delayed_keep_period = PT30S; evs.inactive_check_period = PT0.5S; evs.inactive_timeout = PT15S; evs.join_retrans_period = PT1S; evs.max_install_timeouts = 3 Evs.send_window = 10; evs.stats_report_period = PT1M; evs.suspect_timeout = PT5S; evs.user_send_window = 4; evs.view_forget_timeout = PT24H; gcache.dir = / data/mysql/data/; gcache.freeze_purge_at_seqno =-1; gcache.keep_pages_count = 0; gcache.keep_pages_size = 0; gcache.mem_size = 0; gcache.name = / data/mysql/data//galera.cache; gcache.page_size = 128m; gcache.recover = no Gcache.size = 128m; gcomm.thread_prio =; gcs.fc_debug = 0; gcs.fc_factor = 1; gcs.fc_limit = 100; gcs.fc_master_slave = no; gcs.max_packet_size = 64500; gcs.max_throttle = 0.25; gcs.recv_q_hard_limit = 9223372036854775807; gcs.recv_q_soft_limit = 0.25; gcs.sync_donor = no; gmcast.segment = 0; gmcast.version = 0; pc.announce_timeout = PT3S; pc.checksum = false Pc.ignore_quorum = false; pc.ignore_sb = false; pc.npvo = false; pc.recovery = 1; pc.version = 0; pc.wait_prim = true; pc.wait_prim_timeout = PT30S; pc.weight = 1; protonet.backend = asio; protonet.version = 0; repl.causal_read_timeout = PT30S; repl.commit_order = 3; repl.key_format = FLAT8; repl.max_ws_size = 2147483647; repl.proto_max = 9; socket.checksum = 2; socket.recv_buf_size = 212992

2018-10-25T00:37:37.639698Z 0 [Note] WSREP: GCache history reset: 00000000-0000-0000-0000-000000000000000000-0000000-0000-0000-0000-00000000000000

2018-10-25T00:37:37.640861Z 0 [Note] WSREP: Assign initial position for certification:-1, protocol version:-1

2018-10-25T00:37:37.640921Z 0 [Note] WSREP: Preparing to initiate SST/IST

2018-10-25T00:37:37.640931Z 0 [Note] WSREP: Starting replication

2018-10-25T00:37:37.640955Z 0 [Note] WSREP: Setting initial position to 00000000-0000-0000-0000-0000000000Rue 1

2018-10-25T00:37:37.641204Z 0 [Note] WSREP: Using CRC-32C for message checksums.

2018-10-25T00:37:37.641388Z 0 [Note] WSREP: gcomm thread scheduling priority set to other:0

2018-10-25T00:37:37.641549Z 0 [Warning] WSREP: Fail to access the file (/ data/mysql/data//gvwstate.dat) error (No such file or directory). It is possible if node is booting for first time or re-booting after a graceful shutdown

2018-10-25T00:37:37.641572Z 0 [Note] WSREP: Restoring primary-component from disk failed. Either node is booting for first time or re-booting after a graceful shutdown

2018-10-25T00:37:37.642236Z 0 [Note] WSREP: GMCast version 0

2018-10-25T00:37:37.642482Z 0 [Note] WSREP: (2c12c4d0, 'tcp://0.0.0.0:4567') listening at tcp://0.0.0.0:4567

2018-10-25T00:37:37.642512Z 0 [Note] WSREP: (2c12c4d0, 'tcp://0.0.0.0:4567') multicast:, ttl: 1

2018-10-25T00:37:37.642869Z 0 [Note] WSREP: EVS version 0

2018-10-25T00:37:37.642993Z 0 [Note] WSREP: gcomm: connecting to group 'pxc', peer' 192.168.1.6 gcomm gcomm '192.168.1.7 WSREP 192.168.1.8

2018-10-25T00:37:37.644651Z 0 [Note] WSREP: (2c12c4d0, 'tcp://0.0.0.0:4567') connection established to 2c12c4d0 tcp://192.168.1.8:4567

2018-10-25T00:37:37.644690Z 0 [Warning] WSREP: (2c12c4d0, 'tcp://0.0.0.0:4567') address' tcp://192.168.1.8:4567' points to own listening address, blacklisting

2018-10-25T00:37:37.645337Z 0 [Note] WSREP: (2c12c4d0, 'tcp://0.0.0.0:4567') connection established to e9a1e0cb tcp://192.168.1.6:4567

2018-10-25T00:37:37.645409Z 0 [Note] WSREP: (2c12c4d0, 'tcp://0.0.0.0:4567') turning message relay requesting on, nonlive peers:

2018-10-25T00:37:37.645491Z 0 [Note] WSREP: (2c12c4d0, 'tcp://0.0.0.0:4567') connection established to 37f7ecae tcp://192.168.1.7:4567

2018-10-25T00:37:38.087173Z 0 [Note] WSREP: declaring 37f7ecae at tcp://192.168.1.7:4567 stable

2018-10-25T00:37:38.087221Z 0 [Note] WSREP: declaring e9a1e0cb at tcp://192.168.1.6:4567 stable

2018-10-25T00:37:38.087766Z 0 [Note] WSREP: Node 37f7ecae state primary

2018-10-25T00:37:38.088418Z 0 [Note] WSREP: Current view of cluster as seen by this node

View (view_id (PRIM,2c12c4d0,3))

Memb {

2c12c4d0,0

37f7ecae,0

E9a1e0cb,0

}

Joined {

}

Left {

}

Partitioned {

}

)

2018-10-25T00:37:38.088467Z 0 [Note] WSREP: Save the discovered primary-component to disk

2018-10-25T00:37:38.143936Z 0 [Note] WSREP: gcomm: connected

2018-10-25T00:37:38.144112Z 0 [Note] WSREP: Shifting CLOSED-> OPEN (TO: 0)

2018-10-25T00:37:38.144223Z 0 [Note] WSREP: New COMPONENT: primary = yes, bootstrap = no, my_idx = 0, memb_num = 3

2018-10-25T00:37:38.144485Z 0 [Note] WSREP: Waiting for SST/IST to complete.

2018-10-25T00:37:38.144937Z 0 [Note] WSREP: STATE_EXCHANGE: sent state UUID: 2c5f795f-d7ee-11e8-8779-ef01318078bb

2018-10-25T00:37:38.145593Z 0 [Note] WSREP: STATE EXCHANGE: sent state msg: 2c5f795f-d7ee-11e8-8779-ef01318078bb

2018-10-25T00:37:38.146131Z 0 [Note] WSREP: STATE EXCHANGE: got state msg: 2c5f795f-d7ee-11e8-8779-ef01318078bb from 0 (pxc3)

2018-10-25T00:37:38.146183Z 0 [Note] WSREP: STATE EXCHANGE: got state msg: 2c5f795f-d7ee-11e8-8779-ef01318078bb from 1 (pxc2)

2018-10-25T00:37:38.146191Z 0 [Note] WSREP: STATE EXCHANGE: got state msg: 2c5f795f-d7ee-11e8-8779-ef01318078bb from 2 (pxc1)

2018-10-25T00:37:38.146209Z 0 [Note] WSREP: Quorum results:

Version = 4

Component = PRIMARY

Conf_id = 2

Members = 2 + 3 (primary/total)

Act_id = 5

Last_appl. =-1

Protocols = 0tic9thumb 3 (gcs/repl/appl)

Group UUID = 8c46dd3d-d769-11e8-84c6-d6aac3977406

2018-10-25T00:37:38.146230Z 0 [Note] WSREP: Flow-control interval: [173,173]

2018-10-25T00:37:38.146235Z 0 [Note] WSREP: Trying to continue unpaused monitor

2018-10-25T00:37:38.146239Z 0 [Note] WSREP: Shifting OPEN-> PRIMARY (TO: 5)

2018-10-25T00:37:38.146330Z 2 [Note] WSREP: State transfer required:

Group state: 8c46dd3d-d769-11e8-84c6-d6aac3977406:5

Local state: 00000000-0000-0000-0000-00000000000015

2018-10-25T00:37:38.146378Z 2 [Note] WSREP: REPL Protocols: 9 (4,2)

2018-10-25T00:37:38.146390Z 2 [Note] WSREP: New cluster view: global state: 8c46dd3d-d769-11e8-84c6-d6aac3977406:5, view# 3: Primary, number of nodes: 3, my index: 0, protocol version 3

2018-10-25T00:37:38.146413Z 2 [Note] WSREP: Setting wsrep_ready to true

2018-10-25T00:37:38.146417Z 2 [Warning] WSREP: Gap in state sequence. Need state transfer.

2018-10-25T00:37:38.146421Z 2 [Note] WSREP: Setting wsrep_ready to false

2018-10-25T00:37:38.146607Z 0 [Note] WSREP: Initiating SST/IST transfer on JOINER side (wsrep_sst_xtrabackup-v2-- role 'joiner'-- address' 192.168.1.8'--datadir'/ data/mysql/data/'-- defaults-file'/ etc/my.cnf'-- defaults-group-suffix''- parent '19275'-mysqld-version '5.7.23-23-57'')

2018-10-25T00:37:38.276053Z WSREP_SST: [WARNING] wsrep_node_address or wsrep_sst_receive_address not set. Consider setting them if SST fails.

2018-10-25T00:37:38.717842Z 2 [Note] WSREP: Prepared SST/IST request: xtrabackup-v2 | 192.168.1.8:4444/xtrabackup_sst//1

2018-10-25T00:37:38.717898Z 2 [Note] WSREP: Auto Increment Offset/Increment re-align with cluster membership change (Offset: 1-> 1) (Increment: 1-> 3)

2018-10-25T00:37:38.717913Z 2 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.

2018-10-25T00:37:38.717956Z 2 [Note] WSREP: Assign initial position for certification: 5, protocol version: 4

2018-10-25T00:37:38.718094Z 0 [Note] WSREP: Service thread queue flushed.

2018-10-25T00:37:38.718185Z 2 [Note] WSREP: Check if state gap can be serviced using IST

2018-10-25T00:37:38.718221Z 2 [Note] WSREP: Local UUID: 00000000-0000-0000-0000-000000000000! = Group UUID: 8c46dd3d-d769-11e8-84c6-d6aac3977406

2018-10-25T00:37:38.718290Z 2 [Note] WSREP: State gap can't be serviced using IST. Switching to SST

2018-10-25T00:37:38.718309Z 2 [Note] WSREP: Failed to prepare for incremental state transfer: Local state UUID (00000000-0000-0000-0000-000000000000) does not match group state UUID (8c46dd3d-d769-11e8-84c6-d6aac3977406): 1 (Operation not permitted)

At galera/src/replicator_str.cpp:prepare_for_IST (): 538. IST will be unavailable.

0-10-25T00:37:38.719260Z 0 [Note] WSREP: Member 2018 (pxc3) requested state transfer from'* any*'. Selected 1.0 (pxc2) (SYNCED) as donor.

2018-10-25T00:37:38.719292Z 0 [Note] WSREP: Shifting PRIMARY-> JOINER (TO: 5)

2018-10-25T00:37:38.719342Z 2 [Note] WSREP: Requesting state transfer: success, donor: 1

2018-10-25T00:37:38.719379Z 2 [Note] WSREP: GCache history reset: 00000000-0000-0000-0000-0000000000000000 8c46dd3d-d769-11e8-84c6-d6aac3977406:5

2018-10-25T00:37:39.065413Z WSREP_SST: [INFO] Proceeding with SST.

2018-10-25T00:37:39.107901Z WSREP_SST: [INFO] .waiting for SST streaming to complete!

2018-10-25T00:37:41.144363Z 0 [Note] WSREP: (2c12c4d0, 'tcp://0.0.0.0:4567') turning message relay requesting off

2018-10-25T00:37:57.416507Z 0 [Note] WSREP: 1 (pxc2): State transfer to 0 (pxc3) complete.

0-10-25T00:37:57.417182Z 0 [Note] WSREP: Member 2018 (pxc2) synced with group.

2018-10-25T00:37:57.792678Z WSREP_SST: [INFO] Preparing the backup at / data/mysql/data//.sst

2018-10-25T00:38:01.216124Z WSREP_SST: [INFO] Moving the backup to / data/mysql/data/

2018-10-25T00:38:01.334368Z WSREP_SST: [INFO] Galera co-ords from recovery: 8c46dd3d-d769-11e8-84c6-d6aac3977406:5

2018-10-25T00:38:01.349989Z 0 [Note] WSREP: SST complete, seqno: 5

2018-10-25T00:38:01.351642Z 0 [Note] InnoDB: PUNCH HOLE support available

2018-10-25T00:38:01.351673Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

2018-10-25T00:38:01.351679Z 0 [Note] InnoDB: Uses event mutexes

2018-10-25T00:38:01.351684Z 0 [Note] InnoDB: GCC builtin _ _ sync_synchronize () is used for memory barrier

2018-10-25T00:38:01.351689Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3

2018-10-25T00:38:01.351693Z 0 [Note] InnoDB: Using Linux native AIO

2018-10-25T00:38:01.351959Z 0 [Note] InnoDB: Number of pools: 1

2018-10-25T00:38:01.352117Z 0 [Note] InnoDB: Not using CPU crc32 instructions

2018-10-25T00:38:01.353692Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128m, instances = 1, chunk size = 128m

2018-10-25T00:38:01.357575Z 0 [Note] InnoDB: Completed initialization of buffer pool

2018-10-25T00:38:01.359321Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority ().

2018-10-25T00:38:01.371008Z 0 [Note] InnoDB: Crash recovery did not find the parallel doublewrite buffer at / data/mysql/data/xb_doublewrite

2018-10-25T00:38:01.372004Z 0 [Note] InnoDB: Highest supported file format is Barracuda.

2018-10-25T00:38:01.435065Z 0 [Note] InnoDB: Created parallel doublewrite buffer at / data/mysql/data/xb_doublewrite, size 3932160 bytes

2018-10-25T00:38:01.443390Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"

2018-10-25T00:38:01.443417Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables

2018-10-25T00:38:01.443468Z 0 [Note] InnoDB: Setting file'. / ibtmp1' size to 12 MB. Physically writing the file full; Please wait...

2018-10-25T00:38:01.460205Z 0 [Note] InnoDB: File'. / ibtmp1' size is now 12 MB.

2018-10-25T00:38:01.461083Z 0 [Note] InnoDB: 96 redo rollback segment (s) found. 96 redo rollback segment (s) are active.

2018-10-25T00:38:01.461110Z 0 [Note] InnoDB: 32 non-redo rollback segment (s) are active.

2018-10-25T00:38:01.465650Z 0 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.7.23-23 started; log sequence number 2596904

2018-10-25T00:38:01.466028Z 0 [Note] InnoDB: Loading buffer pool (s) from / data/mysql/data/ib_buffer_pool

2018-10-25T00:38:01.474954Z 0 [Note] InnoDB: Buffer pool (s) load completed at 181025 8:38:01

2018-10-25T00:38:01.475105Z 0 [Note] Plugin 'FEDERATED' is disabled.

2018-10-25T00:38:01.482292Z 0 [Note] Salting uuid generator variables, current_pid: 19275, server_start_time: 1540427857, bytes_sent: 0

2018-10-25T00:38:01.482368Z 0 [Note] Generated uuid: '3a4894e6-d7ee-11e8-8d4d4muri 52540012a8a2, server_start_time: 5425430177638341532, bytes_sent: 47033232

2018-10-25T00:38:01.482410Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 3a4894e6-d7ee-11e8-8d4d-52540012a8a2.

2018-10-25T00:38:01.484106Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.

2018-10-25T00:38:01.484140Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.

2018-10-25T00:38:01.490882Z 0 [Warning] CA certificate ca.pem is self signed.

2018-10-25T00:38:01.490975Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.

2018-10-25T00:38:01.491111Z 0 [Note] Server hostname (bind-address):'*'; port: 3306

2018-10-25T00:38:01.491163Z 0 [Note] IPv6 is available.

2018-10-25T00:38:01.491187Z 0 [Note] -':: 'resolves to'::'

2018-10-25T00:38:01.491215Z 0 [Note] Server socket created on IP:':'.

2018-10-25T00:38:01.500423Z 0 [Note] Event Scheduler: Loaded 0 events

2018-10-25T00:38:01.500596Z 0 [Note] WSREP: Signalling provider to continue on SST completion.

2018-10-25T00:38:01.500641Z 0 [Note] WSREP: Initialized wsrep sidno 2

2018-10-25T00:38:01.500675Z 0 [Note] WSREP: SST received: 8c46dd3d-d769-11e8-84c6-d6aac3977406:5

2018-10-25T00:38:01.501000Z 0 [Note] / usr/sbin/mysqld: ready for connections.

Version: '5.7.23-23-57' socket:' / var/lib/mysql/mysql.sock' port: 3306 Percona XtraDB Cluster (GPL), Release rel23, Revision f5578f0, WSREP version 31.31, wsrep_31.31

0-10-25T00:38:01.503540Z 0 [Note] WSREP: 0 (pxc3): State transfer from 2018 (pxc2) complete.

2018-10-25T00:38:01.503558Z 0 [Note] WSREP: SST leaving flow control

2018-10-25T00:38:01.503563Z 0 [Note] WSREP: Shifting JOINER-> JOINED (TO: 5)

0-10-25T00:38:01.504189Z 0 [Note] WSREP: Member 2018 (pxc3) synced with group.

2018-10-25T00:38:01.504209Z 0 [Note] WSREP: Shifting JOINED-> SYNCED (TO: 5)

2018-10-25T00:38:01.504236Z 2 [Note] WSREP: Synchronized with group, ready for connections

2018-10-25T00:38:01.504258Z 2 [Note] WSREP: Setting wsrep_ready to true

2018-10-25T00:38:01.504272Z 2 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.

Bulk write data test for master node:

[root@test06 /] # mysql

Welcome to the MySQL monitor. Commands end with; or\ g.

Your MySQL connection id is 12

Server version: 5.7.23-31.31 Percona XtraDB Cluster binary (GPL) 5.7.23-31.31, Revision f5578f0, wsrep_31.31

Copyright (c) 2009-2018 Percona LLC and/or its affiliates

Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

Affiliates. Other names may be trademarks of their respective

Owners.

Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.

Mysql >

Mysql > create database test

Query OK, 1 row affected (0.03 sec)

Mysql > delimiter / /

Mysql > create procedure test_load (count int unsigned)

-> begin

-> declare s int unsigned default 1

-> declare c char (80) default repeat ('astatine 80)

-> while s insert into test select null,c

-> commit

-> set s = s + 1

-> end while

-> end

-> / /

Query OK, 0 rows affected (0.09 sec)

Mysql > delimiter

Mysql > call test_load (10000)

Query OK, 0 rows affected (1 min 20.58 sec)

Log in to two slave nodes to view synchronized data:

[root@test07 ~] # mysql

Welcome to the MySQL monitor. Commands end with; or\ g.

Your MySQL connection id is 10

Server version: 5.7.23-23-57 Percona XtraDB Cluster (GPL), Release rel23, Revision f5578f0, WSREP version 31.31, wsrep_31.31

Copyright (c) 2009-2018 Percona LLC and/or its affiliates

Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

Affiliates. Other names may be trademarks of their respective

Owners.

Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.

Mysql >

Mysql > use test

Reading table information for completion of table and column names

You can turn off this feature to get a quicker startup with-A

Database changed

Mysql > select count (*) from test

+-+

| | count (*) |

+-+

| | 10000 |

+-+

1 row in set (0.00 sec)

[root@test08 ~] # mysql

Welcome to the MySQL monitor. Commands end with; or\ g.

Your MySQL connection id is 8

Server version: 5.7.23-23-57 Percona XtraDB Cluster (GPL), Release rel23, Revision f5578f0, WSREP version 31.31, wsrep_31.31

Copyright (c) 2009-2018 Percona LLC and/or its affiliates

Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

Affiliates. Other names may be trademarks of their respective

Owners.

Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.

Mysql > use test

Reading table information for completion of table and column names

You can turn off this feature to get a quicker startup with-A

Database changed

Mysql > select count (*) from test

+-+

| | count (*) |

+-+

| | 10000 |

+-+

1 row in set (0.00 sec)

Note: pxc writes data on any node will be automatically synchronized to other nodes.

In addition, pxc does not support tables without primary keys, otherwise inserting data will report an error, for example:

Mysql > create table a (id int)

Query OK, 0 rows affected (0.07 sec)

Mysql > insert into a values (1)

ERROR 1105 (HY000): Percona-XtraDB-Cluster prohibits use of DML command ona table (dsf.a) without an explicit primary key with pxc_strict_mode = ENFORCING or MASTER

The above is all the contents of the article "how to install and use PXC5.7 version Cluster". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report