在PXC中重新添加掉线节点
Hostname | IP | Port | OS Version | MySQL Version | Xtrabackup version |
zlm2 | 192.168.1.101 | 3308 | CentOS 7.0 | PXC 5.7.22 | 2.4.12 Linux (x86_64) |
zlm3 | 192.168.1.102 | 3308 | CentOS 7.0 | PXC 5.7.22 | 2.4.12 Linux (x86_64) |
zlm4 | 192.168.1.103 | 3308 | CentOS 7.0 | PXC 5.7.22 | 2.4.12 Linux (x86_64) |
--09T07::32.568794+: [Note] WSREP: Initiating SST/IST transfer on JOINER side (wsrep_sst_xtrabackup-v2 --role 'joiner' --address '192.168.1.103' --datadir '/data/mysql/mysql3308/data/' --defaults-file '/data/mysql/mysql3308/my3308.cnf' --defaults-group-suffix '' --parent '' --binlog '/data/mysql/mysql3308/logs/mysql-bin' )
--09T07::33.225673+: [Note] WSREP: Prepared SST/IST request: xtrabackup-v2|192.168.1.103:/xtrabackup_sst//
--09T07::33.225697+: [Note] WSREP: Auto Increment Offset/Increment re-align with cluster membership change (Offset: -> ) (Increment: -> )
--09T07::33.225704+: [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
--09T07::33.225721+: [Note] WSREP: Assign initial position for certification: , protocol version:
--09T07::33.225760+: [Note] WSREP: Service thread queue flushed.
--09T07::33.226619+: [Note] WSREP: Check if state gap can be serviced using IST
--09T07::33.226638+: [Note] WSREP: Local UUID: ---- != Group UUID: bd5525ab-9a15-11e8-aa0f-4b830c783fc7
--09T07::33.226677+: [Note] WSREP: State gap can't be serviced using IST. Switching to SST
--09T07::33.226683+: [Note] WSREP: Failed to prepare for incremental state transfer: Local state UUID (----) does not match group state UUID (bd5525ab-9a15-11e8-aa0f-4b830c783fc7): (Operation not permitted)
at galera/src/replicator_str.cpp:prepare_for_IST():. IST will be unavailable.
--09T07::33.228003+: [Note] WSREP: Member 2.0 (zlm4) requested state transfer from '*any*'. Selected 0.0 (zlm2)(SYNCED) as donor.
--09T07::33.228029+: [Note] WSREP: Shifting PRIMARY -> JOINER (TO: )
--09T07::33.228088+: [Note] WSREP: Requesting state transfer: success, donor:
--09T07::33.228108+: [Note] WSREP: GCache history reset: ----: -> bd5525ab-9a15-11e8-aa0f-4b830c783fc7:
--09T05::.781389Z WSREP_SST: [INFO] Proceeding with SST.........
--09T05::.808866Z WSREP_SST: [INFO] ............Waiting for SST streaming to complete!
(zlm@192.168.1.101 )[(none)]>show global status like '%wsrep%';
+----------------------------------+----------------------------------------------------------+
| Variable_name | Value |
+----------------------------------+----------------------------------------------------------+
| wsrep_local_state_uuid | bd5525ab-9a15-11e8-aa0f-4b830c783fc7 |
| wsrep_protocol_version | |
| wsrep_last_applied | |
| wsrep_last_committed | |
| wsrep_replicated | |
| wsrep_replicated_bytes | |
| wsrep_repl_keys | |
| wsrep_repl_keys_bytes | |
| wsrep_repl_data_bytes | |
| wsrep_repl_other_bytes | |
| wsrep_received | |
| wsrep_received_bytes | |
| wsrep_local_commits | |
| wsrep_local_cert_failures | |
| wsrep_local_replays | |
| wsrep_local_send_queue | |
| wsrep_local_send_queue_max | |
| wsrep_local_send_queue_min | |
| wsrep_local_send_queue_avg | 0.000000 |
| wsrep_local_recv_queue | |
| wsrep_local_recv_queue_max | |
| wsrep_local_recv_queue_min | |
| wsrep_local_recv_queue_avg | 0.047619 |
| wsrep_local_cached_downto | |
| wsrep_flow_control_paused_ns | |
| wsrep_flow_control_paused | 0.000000 |
| wsrep_flow_control_sent | |
| wsrep_flow_control_recv | |
| wsrep_flow_control_interval | [ , ] |
| wsrep_flow_control_interval_low | |
| wsrep_flow_control_interval_high | |
| wsrep_flow_control_status | OFF |
| wsrep_cert_deps_distance | 0.000000 |
| wsrep_apply_oooe | 0.000000 |
| wsrep_apply_oool | 0.000000 |
| wsrep_apply_window | 0.000000 |
| wsrep_commit_oooe | 0.000000 |
| wsrep_commit_oool | 0.000000 |
| wsrep_commit_window | 0.000000 |
| wsrep_local_state | |
| wsrep_local_state_comment | Synced |
| wsrep_cert_index_size | |
| wsrep_cert_bucket_count | |
| wsrep_gcache_pool_size | |
| wsrep_causal_reads | |
| wsrep_cert_interval | 0.000000 |
| wsrep_ist_receive_status | |
| wsrep_ist_receive_seqno_start | |
| wsrep_ist_receive_seqno_current | |
| wsrep_ist_receive_seqno_end | |
| wsrep_incoming_addresses | 192.168.1.101:,192.168.1.102:,192.168.1.103: |
| wsrep_desync_count | |
| wsrep_evs_delayed | |
| wsrep_evs_evict_list | |
| wsrep_evs_repl_latency | //// |
| wsrep_evs_state | OPERATIONAL |
| wsrep_gcomm_uuid | 13eae368-9b79-11e8--338307f4c6cc |
| wsrep_cluster_conf_id | |
| wsrep_cluster_size | | //It means I've got three nodes in PXC.
| wsrep_cluster_state_uuid | bd5525ab-9a15-11e8-aa0f-4b830c783fc7 |
| wsrep_cluster_status | Primary |
| wsrep_connected | ON |
| wsrep_local_bf_aborts | |
| wsrep_local_index | |
| wsrep_provider_name | Galera |
| wsrep_provider_vendor | Codership Oy <info@codership.com> |
| wsrep_provider_version | 3.26(r) |
| wsrep_ready | ON |
+----------------------------------+----------------------------------------------------------+
rows in set (0.00 sec)
Shutdown MySQL instance on zlm4.
[root@zlm4 :: /data/mysql/mysql3308]
#!ps
ps aux|grep mysqld
mysql 0.2 21.9 pts/ Sl : : mysqld --defaults-file=/data/mysql/mysql3308/my3308.cnf
root 0.0 0.0 pts/ R+ : : grep --color=auto mysqld [root@zlm4 :: /data/mysql/mysql3308]
#pkill mysqld [root@zlm4 :: /data/mysql/mysql3308]
#!ps
ps aux|grep mysqld
root 0.0 0.0 pts/ R+ : : grep --color=auto mysqld
[]+ Done mysqld --defaults-file=/data/mysql/mysql3308/my3308.cnf
Check the error log on node zlm3.
[root@zlm3 :: /data/mysql/mysql3308/data]
#tail -f error.log
--09T09::44.880772+: [Note] WSREP: (23fb8f7a, 'tcp://0.0.0.0:4567') turning message relay requesting on, nonlive peers: tcp://192.168.1.103:4567
--09T09::44.880866+: [Note] WSREP: declaring 13eae368 at tcp://192.168.1.101:4567 stable
--09T09::44.880877+: [Note] WSREP: forgetting 74f3db69 (tcp://192.168.1.103:4567)
--09T09::44.880899+: [Note] WSREP: (23fb8f7a, 'tcp://0.0.0.0:4567') turning message relay requesting off
--09T09::44.884451+: [Note] WSREP: Node 13eae368 state primary
--09T09::44.887086+: [Note] WSREP: Current view of cluster as seen by this node
view (view_id(PRIM,13eae368,)
memb {
13eae368,
23fb8f7a,
}
joined {
}
left {
}
partitioned {
74f3db69,
}
)
--09T09::44.887205+: [Note] WSREP: Save the discovered primary-component to disk
--09T09::44.887402+: [Note] WSREP: forgetting 74f3db69 (tcp://192.168.1.103:4567)
--09T09::44.887688+: [Note] WSREP: New COMPONENT: primary = yes, bootstrap = no, my_idx = , memb_num =
--09T09::44.887705+: [Note] WSREP: STATE EXCHANGE: Waiting for state UUID.
--09T09::44.888444+: [Note] WSREP: STATE EXCHANGE: sent state msg: 37401cc1-9ba2-11e8-87aa-2f9e83444bbe
--09T09::44.889150+: [Note] WSREP: STATE EXCHANGE: got state msg: 37401cc1-9ba2-11e8-87aa-2f9e83444bbe from (zlm2)
--09T09::44.889187+: [Note] WSREP: STATE EXCHANGE: got state msg: 37401cc1-9ba2-11e8-87aa-2f9e83444bbe from (zlm3)
--09T09::44.889198+: [Note] WSREP: Quorum results:
version = ,
component = PRIMARY,
conf_id = ,
members = / (primary/total),
act_id = ,
last_appl. = ,
protocols = // (gcs/repl/appl),
group UUID = bd5525ab-9a15-11e8-aa0f-4b830c783fc7
--09T09::44.889206+: [Note] WSREP: Flow-control interval: [, ]
--09T09::44.889210+: [Note] WSREP: Trying to continue unpaused monitor
--09T09::44.889304+: [Note] WSREP: REPL Protocols: (, )
--09T09::44.889315+: [Note] WSREP: New cluster view: global state: bd5525ab-9a15-11e8-aa0f-4b830c783fc7:, view# : Primary, number of nodes: , my index: , protocol version
--09T09::44.889319+: [Note] WSREP: Setting wsrep_ready to true
--09T09::44.889324+: [Note] WSREP: Auto Increment Offset/Increment re-align with cluster membership change (Offset: -> ) (Increment: -> )
--09T09::44.889328+: [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
--09T09::44.889336+: [Note] WSREP: Assign initial position for certification: , protocol version:
--09T09::44.889355+: [Note] WSREP: Service thread queue flushed.
--09T09::50.000210+: [Note] WSREP: cleaning up 74f3db69 (tcp://192.168.1.103:4567)
[root@zlm3 :: /data/mysql/mysql3308/data]
#mysql -uzlm -pzlmzlm -h192.168.1. -P3308
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is
Server version: 5.7.--29.26-log Percona XtraDB Cluster binary (GPL) 5.7.-29.26, Revision da86071, wsrep_29. Copyright (c) - Percona LLC and/or its affiliates
Copyright (c) , , 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. (zlm@192.168.1.102 )[(none)]>show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
rows in set (0.01 sec) (zlm@192.168.1.102 )[(none)]>create database zlm;
Query OK, row affected (0.01 sec) (zlm@192.168.1.102 )[(none)]>use zlm;
Database changed
(zlm@192.168.1.102 )[zlm]>create table t1(
-> id int,
-> name char()
-> ) engine=innodb charset=utf8mb4;
Query OK, rows affected (0.04 sec) (zlm@192.168.1.102 )[zlm]>insert into t1 values(,'MySQL'),(,'Oracle'),(,'PostgreSQL');
ERROR (HY000): Percona-XtraDB-Cluster prohibits use of DML command on a table (zlm.t1) without an explicit primary key with pxc_strict_mode = ENFORCING or MASTER //DML of tables need explicit primary key in PXC.
(zlm@192.168.1.102 )[zlm]>alter table t1 add primary key(id);
Query OK, rows affected (0.08 sec)
Records: Duplicates: Warnings: (zlm@192.168.1.102 )[zlm]>insert into t1 values(,'MySQL'),(,'Oracle'),(,'PostgreSQL');
Query OK, rows affected (0.01 sec)
Records: Duplicates: Warnings: (zlm@192.168.1.102 )[zlm]>select * from t1;
+----+------------+
| id | name |
+----+------------+
| | MySQL |
| | Oracle |
| | PostgreSQL |
+----+------------+
rows in set (0.00 sec)
[root@zlm2 :: ~]
#mysql -uzlm -pzlmzlm -h192.168.1. -P3308
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is
Server version: 5.7.--29.26-log Percona XtraDB Cluster binary (GPL) 5.7.-29.26, Revision da86071, wsrep_29. Copyright (c) - Percona LLC and/or its affiliates
Copyright (c) , , 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. (zlm@192.168.1.101 )[(none)]>select * from zlm.t1;
+----+------------+
| id | name |
+----+------------+
| | MySQL |
| | Oracle |
| | PostgreSQL |
+----+------------+
rows in set (0.00 sec) //The PXC is working normally now.
[root@zlm3 :: ~]
#innobackupex --defaults-file=/data/mysql/mysql3308/my3308.cnf --user=root --password=Passw0rd --host=localhost -S /tmp/mysql3308.sock --port= /data/backup
xtrabackup: recognized server arguments: --datadir=/data/mysql/mysql3308/data --server-id= --open_files_limit= --log_bin=/data/mysql/mysql3308/logs/mysql-bin --innodb_data_file_path=ibdata1:100M:autoextend --innodb_buffer_pool_filename=ib_buffer_pool --innodb_log_files_in_group= --innodb_log_file_size=100M --innodb_file_per_table= --innodb_open_files= --innodb_page_size=16k --innodb_read_io_threads= --innodb_write_io_threads= --innodb_io_capacity= --innodb_doublewrite= --innodb_log_buffer_size=128M --innodb_flush_log_at_trx_commit= --innodb_buffer_pool_size=100M --innodb_flush_method=O_DIRECT
xtrabackup: recognized client arguments: --datadir=/data/mysql/mysql3308/data --server-id= --open_files_limit= --log_bin=/data/mysql/mysql3308/logs/mysql-bin --innodb_data_file_path=ibdata1:100M:autoextend --innodb_buffer_pool_filename=ib_buffer_pool --innodb_log_files_in_group= --innodb_log_file_size=100M --innodb_file_per_table= --innodb_open_files= --innodb_page_size=16k --innodb_read_io_threads= --innodb_write_io_threads= --innodb_io_capacity= --innodb_doublewrite= --innodb_log_buffer_size=128M --innodb_flush_log_at_trx_commit= --innodb_buffer_pool_size=100M --innodb_flush_method=O_DIRECT
:: innobackupex: Starting the backup operation ... //Omitted. :: Finished backing up non-InnoDB tables and files
:: Executing LOCK BINLOG FOR BACKUP... //Here's the difference of lock mode between community and percona version of MySQL.
:: [] Writing /data/backup/--09_09--/xtrabackup_binlog_info
:: [] ...done
:: Executing FLUSH NO_WRITE_TO_BINLOG ENGINE LOGS...
xtrabackup: The latest check point (for incremental): ''
xtrabackup: Stopping log copying thread.
. :: >> log scanned up to () :: Executing UNLOCK BINLOG
:: Executing UNLOCK TABLES
:: All tables unlocked
:: [] Copying ib_buffer_pool to /data/backup/--09_09--/ib_buffer_pool
:: [] ...done
:: Backup created in directory '/data/backup/2018-08-09_09-26-05/'
MySQL binlog position: filename 'mysql-bin.000023', position '', GTID of the last change '42aada54-65ea-ee17-55f0-b47cf387c038:1-23'
:: [] Writing /data/backup/--09_09--/backup-my.cnf
:: [] ...done
:: [] Writing /data/backup/--09_09--/xtrabackup_info
:: [] ...done
xtrabackup: Transaction log of lsn () to () was copied.
:: completed OK!
[root@zlm3 :: ~]
#scp -r /data/backup/--09_09--/ zlm4:/data/backup/
root@zlm4's password:
xtrabackup_logfile % .5KB/s :
ibdata1 % 100MB .3MB/s :
plugin.ibd % 96KB .0KB/s :
servers.ibd % 96KB .0KB/s :
... //Omitted.
[root@zlm4 :: /data/backup]
#innobackupex --apply-log /data/backup/--09_09--/
xtrabackup: recognized server arguments: --innodb_checksum_algorithm=crc32 --innodb_log_checksum_algorithm=strict_crc32 --innodb_data_file_path=ibdata1:100M:autoextend --innodb_log_files_in_group= --innodb_log_file_size= --innodb_fast_checksum= --innodb_page_size= --innodb_log_block_size= --innodb_undo_directory=./ --innodb_undo_tablespaces= --server-id= --redo-log-version= --innodb_buffer_pool_filename=ib_buffer_pool
xtrabackup: recognized client arguments: --innodb_checksum_algorithm=crc32 --innodb_log_checksum_algorithm=strict_crc32 --innodb_data_file_path=ibdata1:100M:autoextend --innodb_log_files_in_group= --innodb_log_file_size= --innodb_fast_checksum= --innodb_page_size= --innodb_log_block_size= --innodb_undo_directory=./ --innodb_undo_tablespaces= --server-id= --redo-log-version= --innodb_buffer_pool_filename=ib_buffer_pool
:: innobackupex: Starting the apply-log operation ... //Omitted. InnoDB: Waiting for purge to start
InnoDB: 5.7. started; log sequence number
xtrabackup: starting shutdown with innodb_fast_shutdown =
InnoDB: page_cleaner: 1000ms intended loop took 17036ms. The settings might not be optimal. (flushed= and evicted=, during the time.)
InnoDB: FTS optimize thread exiting.
InnoDB: Starting shutdown...
InnoDB: Shutdown completed; log sequence number
:: completed OK! [root@zlm4 :: /data/mysql/mysql3308/data]
#ls -l
total
-rw-r----- mysql mysql Aug : auto.cnf
-rw------- mysql mysql Aug : ca-key.pem
-rw-r--r-- mysql mysql Aug : ca.pem
-rw-r--r-- mysql mysql Aug : client-cert.pem
-rw------- mysql mysql Aug : client-key.pem
-rw-r----- mysql mysql Aug : error.log
-rw-r----- mysql mysql Aug : galera.cache
-rw-r----- mysql mysql Aug : grastate.dat
-rw-r----- mysql mysql Aug : ib_buffer_pool
-rw-r----- mysql mysql Aug : ibdata1
-rw-r----- mysql mysql Aug : ib_logfile0
-rw-r----- mysql mysql Aug : ib_logfile1
-rw-r----- mysql mysql Aug : ib_logfile2
drwxr-x--- mysql mysql Aug : mysql
drwxr-x--- mysql mysql Aug : performance_schema
-rw------- mysql mysql Aug : private_key.pem
-rw-r--r-- mysql mysql Aug : public_key.pem
-rw-r--r-- mysql mysql Aug : server-cert.pem
-rw------- mysql mysql Aug : server-key.pem
-rw-r----- mysql mysql Aug : slow.log
drwxr-x--- mysql mysql Aug : sys [root@zlm4 :: /data/mysql/mysql3308/data]
#rm -rf * [root@zlm4 :: /data/mysql/mysql3308/data]
#innobackupex --defaults-file=/data/mysql/mysql3308/my3308.cnf --copy-back /data/backup/--09_09--/
xtrabackup: recognized server arguments: --datadir=/data/mysql/mysql3308/data --server-id= --open_files_limit= --log_bin=/data/mysql/mysql3308/logs/mysql-bin --innodb_data_file_path=ibdata1:100M:autoextend --innodb_buffer_pool_filename=ib_buffer_pool --innodb_log_files_in_group= --innodb_log_file_size=100M --innodb_file_per_table= --innodb_open_files= --innodb_page_size=16k --innodb_read_io_threads= --innodb_write_io_threads= --innodb_io_capacity= --innodb_doublewrite= --innodb_log_buffer_size=128M --innodb_flush_log_at_trx_commit= --innodb_buffer_pool_size=100M --innodb_flush_method=O_DIRECT
xtrabackup: recognized client arguments: --datadir=/data/mysql/mysql3308/data --server-id= --open_files_limit= --log_bin=/data/mysql/mysql3308/logs/mysql-bin --innodb_data_file_path=ibdata1:100M:autoextend --innodb_buffer_pool_filename=ib_buffer_pool --innodb_log_files_in_group= --innodb_log_file_size=100M --innodb_file_per_table= --innodb_open_files= --innodb_page_size=16k --innodb_read_io_threads= --innodb_write_io_threads= --innodb_io_capacity= --innodb_doublewrite= --innodb_log_buffer_size=128M --innodb_flush_log_at_trx_commit= --innodb_buffer_pool_size=100M --innodb_flush_method=O_DIRECT
:: innobackupex: Starting the copy-back operation [root@zlm4 :: /data/mysql/mysql3308/data]
#ls -l
total
-rw-r----- root root Aug : ib_buffer_pool
-rw-r----- root root Aug : ibdata1
-rw-r----- root root Aug : ib_logfile0
-rw-r----- root root Aug : ib_logfile1
-rw-r----- root root Aug : ib_logfile2
-rw-r----- root root Aug : ibtmp1
drwxr-x--- root root Aug : mysql
drwxr-x--- root root Aug : performance_schema
drwxr-x--- root root Aug : sys
-rw-r----- root root Aug : xtrabackup_binlog_pos_innodb
-rw-r----- root root Aug : xtrabackup_galera_info
-rw-r----- root root Aug : xtrabackup_info
-rw-r----- root root Aug : xtrabackup_master_key_id
drwxr-x--- root root Aug : zlm [root@zlm4 :: /data/mysql/mysql3308/data]
#chown -R mysql.mysql *
[root@zlm4 :: /data/mysql/mysql3308]
#cat my3308.cnf |grep wsrep
#loose-wsrep_cluster_name=pxc_wubx
#loose-wsrep_cluster_address=gcomm://192.168.1.101,192.168.1.102,192.168.1.103
#loose-wsrep_node_address=192.168.1.103
#loose-wsrep_provider=/usr/local/mysql/lib/libgalera_smm.so
#loose-wsrep_sst_method=xtrabackup-v2
#loose-wsrep_sst_method=rsync
#loose-wsrep_sst_auth=sst:zlmzlm
#loose-wsrep_debug=on
#loose-wsrep_provider_options="debug=on" [root@zlm4 :: /data/mysql/mysql3308]
#mysqld --defaults-file=/data/mysql/mysql3308/my3308.cnf &
[] [root@zlm4 :: /data/mysql/mysql3308]
#!ps
ps aux|grep mysqld
mysql 24.3 17.9 pts/ Sl : : mysqld --defaults-file=/data/mysql/mysql3308/my3308.cnf
root 0.0 0.0 pts/ R+ : : grep --color=auto mysqld
//Create a replication user on node zlm3.
(zlm@192.168.1.102 )[zlm]>grant all privileges on *.* to repl@'192.168.1.%' identified by 'repl4slave';
ERROR (): Access denied for user 'zlm'@'192.168.1.%' (using password: YES)
(zlm@192.168.1.102 )[zlm]>\q
Bye [root@zlm3 :: /data/mysql/mysql3308/data]
#mysql -uroot -pPassw0rd -hlocalhost -P3308
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR (HY000): Can't connect to local MySQL server through socket '/tmp/mysql3306.sock' (2) [root@zlm3 :: /data/mysql/mysql3308/data]
#mysql -uroot -pPassw0rd -hlocalhost -P3308 -S /tmp/mysql3308.sock
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is
Server version: 5.7.--29.26-log Percona XtraDB Cluster binary (GPL) 5.7.-29.26, Revision da86071, wsrep_29. Copyright (c) - Percona LLC and/or its affiliates
Copyright (c) , , 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. (root@localhost mysql3308.sock)[(none)]>grant all privileges on *.* to repl@'192.168.1.%' identified by 'repl4slave';
Query OK, rows affected, warning (0.00 sec) (root@localhost mysql3308.sock)[(none)]>select user,host from mysql.user;
+---------------+-------------+
| user | host |
+---------------+-------------+
| repl | 192.168..% |
| zlm | 192.168..% |
| mysql.session | localhost |
| mysql.sys | localhost |
| root | localhost |
| sst | localhost |
+---------------+-------------+
rows in set (0.01 sec) //Execute "change master to ... " on node zlm4.
[root@zlm4 :: /data/mysql/mysql3308]
#mysql -uzlm -pzlmzlm -h192.168.1. -P3308
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is
Server version: 5.7.--29.26-log Percona XtraDB Cluster binary (GPL) 5.7.-29.26, Revision da86071, wsrep_29. Copyright (c) - Percona LLC and/or its affiliates
Copyright (c) , , 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. (zlm@192.168.1.103 )[(none)]>change master to master_host='192.168.1.102',master_port=,master_user='repl',master_password='repl4slave',master_auto_position=;
Query OK, rows affected, warning (0.02 sec) (zlm@192.168.1.103 )[(none)]>start slave;
Query OK, rows affected (0.02 sec) (zlm@192.168.1.103 )[(none)]>show slave status\G
*************************** . row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.1.102
Master_User: repl
Master_Port:
Connect_Retry:
Master_Log_File: mysql-bin.
Read_Master_Log_Pos:
Relay_Log_File: zlm4-relay-bin.
Relay_Log_Pos:
Relay_Master_Log_File: mysql-bin.
Slave_IO_Running: Yes
Slave_SQL_Running: No
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno:
Last_Error: Coordinator stopped because there were error(s) in the worker(s). The most recent failure being: Worker failed executing transaction '42aada54-65ea-ee17-55f0-b47cf387c038:20' at master log mysql-bin., end_log_pos . See error log and/or performance_schema.replication_applier_status_by_worker table for more details about this failure or others, if any.
Skip_Counter:
Exec_Master_Log_Pos:
Relay_Log_Space:
Until_Condition: None
Until_Log_File:
Until_Log_Pos:
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno:
Last_IO_Error:
Last_SQL_Errno:
Last_SQL_Error: Coordinator stopped because there were error(s) in the worker(s). The most recent failure being: Worker failed executing transaction '42aada54-65ea-ee17-55f0-b47cf387c038:20' at master log mysql-bin., end_log_pos . See error log and/or performance_schema.replication_applier_status_by_worker table for more details about this failure or others, if any.
Replicate_Ignore_Server_Ids:
Master_Server_Id:
Master_UUID: 3ba41aa7-9b79-11e8-ad75-080027de0e0e
Master_Info_File: /data/mysql/mysql3308/data/master.info
SQL_Delay:
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State:
Master_Retry_Count:
Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp: ::
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set: 42aada54-65ea-ee17-55f0-b47cf387c038:-
Executed_Gtid_Set: 42aada54-65ea-ee17-55f0-b47cf387c038:-
Auto_Position:
Replicate_Rewrite_DB:
Channel_Name:
Master_TLS_Version:
row in set (0.00 sec) //The error log shows below.
--09T10::45.368412+: [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--relay-log=zlm4-relay-bin' to avoid this problem.
--09T10::45.382500+: [Note] 'CHANGE MASTER TO FOR CHANNEL '' executed'. Previous state master_host='', master_port= , master_log_file='', master_log_pos= , master_bind=''. New state master_host='192.168.1.102', master_port= , master_log_file='', master_log_pos= , master_bind=''.
--09T10::58.164370+: [Warning] Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
--09T10::58.173589+: [Note] Slave I/O thread for channel '': connected to master 'repl@192.168.1.102:3308',replication started in log 'FIRST' at position
--09T10::58.180721+: [Warning] Slave SQL for channel '': If a crash happens this configuration does not guarantee that the relay log info will be consistent, Error_code:
--09T10::58.180761+: [Note] Slave SQL thread for channel '' initialized, starting replication in log 'FIRST' at position , relay log './zlm4-relay-bin.000001' position:
--09T10::58.202347+: [ERROR] Slave SQL for channel '': Worker failed executing transaction '42aada54-65ea-ee17-55f0-b47cf387c038:20' at master log mysql-bin., end_log_pos ; Error 'Can't create database 'zlm'; database exists' on query. Default database: 'zlm'. Query: 'create database zlm', Error_code: 1007
--09T10::58.202651+: [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'mysql-bin.000023' position //Check the "replication_applier_status_by_worker" table for detail.
(zlm@192.168.1.103 )[(none)]>select * from performance_schema.replication_applier_status_by_worker\G
*************************** . row ***************************
CHANNEL_NAME:
WORKER_ID:
THREAD_ID: NULL
SERVICE_STATE: OFF
LAST_SEEN_TRANSACTION: 42aada54-65ea-ee17-55f0-b47cf387c038:
LAST_ERROR_NUMBER:
LAST_ERROR_MESSAGE: Worker failed executing transaction '42aada54-65ea-ee17-55f0-b47cf387c038:20' at master log mysql-bin., end_log_pos ; Error 'Can't create database 'zlm'; database exists' on query. Default database: 'zlm'. Query: 'create database zlm'
LAST_ERROR_TIMESTAMP: -- ::
*************************** . row ***************************
CHANNEL_NAME:
WORKER_ID:
THREAD_ID: NULL
SERVICE_STATE: OFF
LAST_SEEN_TRANSACTION:
LAST_ERROR_NUMBER:
LAST_ERROR_MESSAGE:
LAST_ERROR_TIMESTAMP: -- ::
*************************** . row ***************************
CHANNEL_NAME:
WORKER_ID:
THREAD_ID: NULL
SERVICE_STATE: OFF
LAST_SEEN_TRANSACTION:
LAST_ERROR_NUMBER:
LAST_ERROR_MESSAGE:
LAST_ERROR_TIMESTAMP: -- ::
*************************** . row ***************************
CHANNEL_NAME:
WORKER_ID:
THREAD_ID: NULL
SERVICE_STATE: OFF
LAST_SEEN_TRANSACTION:
LAST_ERROR_NUMBER:
LAST_ERROR_MESSAGE:
LAST_ERROR_TIMESTAMP: -- ::
rows in set (0.00 sec) //Check the target database and table.
(zlm@192.168.1.103 )[(none)]>show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
| zlm |
+--------------------+
rows in set (0.00 sec) (zlm@192.168.1.103 )[(none)]>use zlm
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
(zlm@192.168.1.103 )[zlm]>show tables;
+---------------+
| Tables_in_zlm |
+---------------+
| t1 |
+---------------+
row in set (0.00 sec) (zlm@192.168.1.103 )[zlm]>select * from t1;
+----+------------+
| id | name |
+----+------------+
| | MySQL |
| | Oracle |
| | PostgreSQL |
+----+------------+
rows in set (0.01 sec) //The changes on node zlm3 has been replicated to zlm4. [root@zlm4 :: /data/mysql/mysql3308/logs]
#ls -l
total
-rw-r----- mysql mysql Aug : mysql-bin.
-rw-r----- mysql mysql Aug : mysql-bin.
-rw-r----- mysql mysql Aug : mysql-bin.
-rw-r----- mysql mysql Aug : mysql-bin.index //No mysql-bin.000023 was found.Check the relay-log file.
[root@zlm4 :: /data/mysql/mysql3308/data]
#ls -l|grep relay
-rw-r----- mysql mysql Aug : relay-log.info
-rw-r----- mysql mysql Aug : worker-relay-log.info.
-rw-r----- mysql mysql Aug : worker-relay-log.info.
-rw-r----- mysql mysql Aug : worker-relay-log.info.
-rw-r----- mysql mysql Aug : worker-relay-log.info.
-rw-r----- mysql mysql Aug : zlm4-relay-bin.
-rw-r----- mysql mysql Aug : zlm4-relay-bin.
-rw-r----- mysql mysql Aug : zlm4-relay-bin.index [root@zlm4 :: /data/mysql/mysql3308/data]
#mysqlbinlog -v --base64-output=decode-rows zlm4-relay-bin. > ~/.log [root@zlm4 :: /data/mysql/mysql3308/data]
#cd [root@zlm4 :: ~]
#cat .log
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at
# :: server id end_log_pos CRC32 0x4367bb3e Start: binlog v , server v 5.7.--29.26-log created ::
# This Format_description_event appears in a relay log and was generated by the slave thread.
# at
# :: server id end_log_pos CRC32 0xf3605911 Previous-GTIDs
# [empty]
# at
# :: server id end_log_pos CRC32 0xb5bcfbb7 Rotate to mysql-bin. pos:
# at
# :: server id end_log_pos CRC32 0x6f7e8565 Start: binlog v , server v 5.7.--29.26-log created :: at startup
ROLLBACK/*!*/;
# at
# :: server id end_log_pos CRC32 0xa757553d Rotate to mysql-bin. pos:
# at
# :: server id end_log_pos CRC32 0x531076d3 GTID last_committed= sequence_number= rbr_only=no
SET @@SESSION.GTID_NEXT= '42aada54-65ea-ee17-55f0-b47cf387c038:20'/*!*/;
# at
# :: server id end_log_pos CRC32 0x9acb4e3f Query thread_id= exec_time= error_code=
SET TIMESTAMP=/*!*/;
SET @@session.pseudo_thread_id=/*!*/;
SET @@session.foreign_key_checks=, @@session.sql_auto_is_null=, @@session.unique_checks=, @@session.autocommit=/*!*/;
SET @@session.sql_mode=/*!*/;
SET @@session.auto_increment_increment=, @@session.auto_increment_offset=/*!*/;
/*!\C utf8 *//*!*/;
SET @@session.character_set_client=,@@session.collation_connection=,@@session.collation_server=/*!*/;
SET @@session.lc_time_names=/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
create database zlm
/*!*/;
# at
# :: server id end_log_pos CRC32 0xde316a34 GTID last_committed= sequence_number= rbr_only=no
SET @@SESSION.GTID_NEXT= '42aada54-65ea-ee17-55f0-b47cf387c038:21'/*!*/;
# at
# :: server id end_log_pos CRC32 0xb29bd4ab Query thread_id= exec_time= error_code=
use `zlm`/*!*/;
SET TIMESTAMP=/*!*/;
create table t1(
id int,
name char()
) engine=innodb charset=utf8mb4
/*!*/;
# at
# :: server id end_log_pos CRC32 0x2a5f6414 GTID last_committed= sequence_number= rbr_only=no
SET @@SESSION.GTID_NEXT= '42aada54-65ea-ee17-55f0-b47cf387c038:22'/*!*/;
# at
# :: server id end_log_pos CRC32 0xa803e3aa Query thread_id= exec_time= error_code=
SET TIMESTAMP=/*!*/;
alter table t1 add primary key(id)
/*!*/;
# at
# :: server id end_log_pos CRC32 0xfd677245 GTID last_committed= sequence_number= rbr_only=yes
/*!50718 SET TRANSACTION ISOLATION LEVEL READ COMMITTED*//*!*/;
SET @@SESSION.GTID_NEXT= '42aada54-65ea-ee17-55f0-b47cf387c038:23'/*!*/;
# at
# :: server id end_log_pos CRC32 0x7b568d5a Query thread_id= exec_time= error_code=
SET TIMESTAMP=/*!*/;
SET @@session.auto_increment_increment=, @@session.auto_increment_offset=/*!*/;
BEGIN
/*!*/;
# at
# at
# :: server id end_log_pos CRC32 0x8b4e5e6b Table_map: `zlm`.`t1` mapped to number
# at
# :: server id end_log_pos CRC32 0x51750bc0 Write_rows: table id flags: STMT_END_F
### INSERT INTO `zlm`.`t1`
### SET
### @=
### @='MySQL'
### INSERT INTO `zlm`.`t1`
### SET
### @=
### @='Oracle'
### INSERT INTO `zlm`.`t1`
### SET
### @=
### @='PostgreSQL'
# at
# :: server id end_log_pos CRC32 0x6033f0ee Xid =
COMMIT/*!*/;
# at
# :: server id end_log_pos CRC32 0x66f4de8c GTID last_committed= sequence_number= rbr_only=no
SET @@SESSION.GTID_NEXT= '42aada54-65ea-ee17-55f0-b47cf387c038:24'/*!*/;
# at
# :: server id end_log_pos CRC32 0x86665c03 Query thread_id= exec_time= error_code=
SET TIMESTAMP=/*!*/;
SET @@session.auto_increment_increment=, @@session.auto_increment_offset=/*!*/;
GRANT ALL PRIVILEGES ON *.* TO 'repl'@'192.168.1.%' IDENTIFIED WITH 'mysql_native_password' AS '*872ECE72A7EBAC6A183C90D7043D5F359BD85A9E'
/*!*/;
SET @@SESSION.GTID_NEXT= 'AUTOMATIC' /* added by mysqlbinlog */ /*!*/;
DELIMITER ;
# End of log file
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/; //Clean the value of variable "gtid_purged".
(zlm@192.168.1.103 )[(none)]>reset master;
Query OK, rows affected (0.03 sec) (zlm@192.168.1.103 )[(none)]>set @@global.gtid_purged='42aada54-65ea-ee17-55f0-b47cf387c038:1-24';
Query OK, rows affected (0.01 sec) (zlm@192.168.1.103 )[(none)]>start slave sql_thread;
Query OK, rows affected (0.00 sec) (zlm@192.168.1.103 )[(none)]>show slave status\G
*************************** . row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.1.102
Master_User: repl
Master_Port:
Connect_Retry:
Master_Log_File: mysql-bin.
Read_Master_Log_Pos:
Relay_Log_File: zlm4-relay-bin.
Relay_Log_Pos:
Relay_Master_Log_File: mysql-bin.
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno:
Last_Error:
Skip_Counter:
Exec_Master_Log_Pos:
Relay_Log_Space:
Until_Condition: None
Until_Log_File:
Until_Log_Pos:
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master:
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno:
Last_IO_Error:
Last_SQL_Errno:
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id:
Master_UUID: 3ba41aa7-9b79-11e8-ad75-080027de0e0e
Master_Info_File: /data/mysql/mysql3308/data/master.info
SQL_Delay:
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State: Slave has read all relay log; waiting for more updates
Master_Retry_Count:
Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp:
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set: 42aada54-65ea-ee17-55f0-b47cf387c038:-
Executed_Gtid_Set: 42aada54-65ea-ee17-55f0-b47cf387c038:-
Auto_Position:
Replicate_Rewrite_DB:
Channel_Name:
Master_TLS_Version:
row in set (0.00 sec)
(root@localhost mysql3308.sock)[(none)]>use zlm
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
(root@localhost mysql3308.sock)[zlm]>insert into t1 values(,'Redis');
Query OK, row affected (0.01 sec) (root@localhost mysql3308.sock)[zlm]>select * from t1;
+----+------------+
| id | name |
+----+------------+
| | MySQL |
| | Oracle |
| | PostgreSQL |
| | Redis |
+----+------------+
rows in set (0.00 sec)
(zlm@192.168.1.103 )[(none)]>stop slave;
Query OK, rows affected (0.01 sec) (zlm@192.168.1.103 )[(none)]>show slave status\G
*************************** . row ***************************
Slave_IO_State:
Master_Host: 192.168.1.102
Master_User: repl
Master_Port:
Connect_Retry:
Master_Log_File: mysql-bin.
Read_Master_Log_Pos:
Relay_Log_File: zlm4-relay-bin.
Relay_Log_Pos:
Relay_Master_Log_File: mysql-bin. //This binlog file is which one we need to analyze later on master node zlm3.
Slave_IO_Running: No
Slave_SQL_Running: No
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno:
Last_Error:
Skip_Counter:
Exec_Master_Log_Pos: //This position is where we need to set the Xid.
Relay_Log_Space:
Until_Condition: None
Until_Log_File:
Until_Log_Pos:
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno:
Last_IO_Error:
Last_SQL_Errno:
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id:
Master_UUID: 3ba41aa7-9b79-11e8-ad75-080027de0e0e
Master_Info_File: /data/mysql/mysql3308/data/master.info
SQL_Delay:
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State:
Master_Retry_Count:
Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp:
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set: 42aada54-65ea-ee17-55f0-b47cf387c038:-
Executed_Gtid_Set: 42aada54-65ea-ee17-55f0-b47cf387c038:-
Auto_Position:
Replicate_Rewrite_DB:
Channel_Name:
Master_TLS_Version:
row in set (0.00 sec)
[root@zlm3 :: /data/mysql/mysql3308/logs]
#mysqlbinlog -v --base64-output=decode-rows mysql-bin. > ~/.log [root@zlm3 :: /data/mysql/mysql3308/logs]
#cat ~/.log
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at
# :: server id end_log_pos CRC32 0x6f7e8565 Start: binlog v , server v 5.7.--29.26-log created :: at startup
# Warning: this binlog is either in use or was not closed properly.
ROLLBACK/*!*/;
# at
# :: server id end_log_pos CRC32 0x43a7c3b7 Previous-GTIDs
# 42aada54-65ea-ee17-55f0-b47cf387c038:-
# at
# :: server id end_log_pos CRC32 0x531076d3 GTID last_committed= sequence_number= rbr_only=no
SET @@SESSION.GTID_NEXT= '42aada54-65ea-ee17-55f0-b47cf387c038:20'/*!*/;
# at
# :: server id end_log_pos CRC32 0x9acb4e3f Query thread_id= exec_time= error_code=
SET TIMESTAMP=/*!*/;
SET @@session.pseudo_thread_id=/*!*/;
SET @@session.foreign_key_checks=, @@session.sql_auto_is_null=, @@session.unique_checks=, @@session.autocommit=/*!*/;
SET @@session.sql_mode=/*!*/;
SET @@session.auto_increment_increment=, @@session.auto_increment_offset=/*!*/;
/*!\C utf8 *//*!*/;
SET @@session.character_set_client=,@@session.collation_connection=,@@session.collation_server=/*!*/;
SET @@session.lc_time_names=/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
create database zlm
/*!*/;
# at
# :: server id end_log_pos CRC32 0xde316a34 GTID last_committed= sequence_number= rbr_only=no
SET @@SESSION.GTID_NEXT= '42aada54-65ea-ee17-55f0-b47cf387c038:21'/*!*/;
# at
# :: server id end_log_pos CRC32 0xb29bd4ab Query thread_id= exec_time= error_code=
use `zlm`/*!*/;
SET TIMESTAMP=/*!*/;
create table t1(
id int,
name char()
) engine=innodb charset=utf8mb4
/*!*/;
# at
# :: server id end_log_pos CRC32 0x2a5f6414 GTID last_committed= sequence_number= rbr_only=no
SET @@SESSION.GTID_NEXT= '42aada54-65ea-ee17-55f0-b47cf387c038:22'/*!*/;
# at
# :: server id end_log_pos CRC32 0xa803e3aa Query thread_id= exec_time= error_code=
SET TIMESTAMP=/*!*/;
alter table t1 add primary key(id)
/*!*/;
# at
# :: server id end_log_pos CRC32 0xfd677245 GTID last_committed= sequence_number= rbr_only=yes
/*!50718 SET TRANSACTION ISOLATION LEVEL READ COMMITTED*//*!*/;
SET @@SESSION.GTID_NEXT= '42aada54-65ea-ee17-55f0-b47cf387c038:23'/*!*/;
# at
# :: server id end_log_pos CRC32 0x7b568d5a Query thread_id= exec_time= error_code=
SET TIMESTAMP=/*!*/;
SET @@session.auto_increment_increment=, @@session.auto_increment_offset=/*!*/;
BEGIN
/*!*/;
# at
# at
# :: server id end_log_pos CRC32 0x8b4e5e6b Table_map: `zlm`.`t1` mapped to number
# at
# :: server id end_log_pos CRC32 0x51750bc0 Write_rows: table id flags: STMT_END_F
### INSERT INTO `zlm`.`t1`
### SET
### @=
### @='MySQL'
### INSERT INTO `zlm`.`t1`
### SET
### @=
### @='Oracle'
### INSERT INTO `zlm`.`t1`
### SET
### @=
### @='PostgreSQL'
# at
# :: server id end_log_pos CRC32 0x6033f0ee Xid =
COMMIT/*!*/;
# at
# :: server id end_log_pos CRC32 0x66f4de8c GTID last_committed= sequence_number= rbr_only=no
SET @@SESSION.GTID_NEXT= '42aada54-65ea-ee17-55f0-b47cf387c038:24'/*!*/;
# at
# :: server id end_log_pos CRC32 0x86665c03 Query thread_id= exec_time= error_code=
SET TIMESTAMP=/*!*/;
SET @@session.auto_increment_increment=, @@session.auto_increment_offset=/*!*/;
GRANT ALL PRIVILEGES ON *.* TO 'repl'@'192.168.1.%' IDENTIFIED WITH 'mysql_native_password' AS '*872ECE72A7EBAC6A183C90D7043D5F359BD85A9E'
/*!*/;
# at
# :: server id end_log_pos CRC32 0x9e027e44 GTID last_committed= sequence_number= rbr_only=yes
/*!50718 SET TRANSACTION ISOLATION LEVEL READ COMMITTED*//*!*/;
SET @@SESSION.GTID_NEXT= '42aada54-65ea-ee17-55f0-b47cf387c038:25'/*!*/;
# at
# :: server id end_log_pos CRC32 0xe5d003cf Query thread_id= exec_time= error_code=
SET TIMESTAMP=/*!*/;
SET @@session.auto_increment_increment=, @@session.auto_increment_offset=/*!*/;
BEGIN
/*!*/;
# at
# at
# :: server id end_log_pos CRC32 0x81684c91 Table_map: `zlm`.`t1` mapped to number
# at
# :: server id end_log_pos CRC32 0x19b42ee8 Write_rows: table id flags: STMT_END_F
### INSERT INTO `zlm`.`t1`
### SET
### @=
### @='Redis'
# at
# :: server id end_log_pos CRC32 0x3429fa99 Xid =
COMMIT/*!*/;
SET @@SESSION.GTID_NEXT= 'AUTOMATIC' /* added by mysqlbinlog */ /*!*/;
DELIMITER ;
# End of log file
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/; [root@zlm3 :: /data/mysql/mysql3308/logs]
#ls -l
total
-rw-r----- mysql mysql Aug : mysql-bin.
-rw-r----- mysql mysql Aug : mysql-bin. //The 1718 bytes is right the position we need to decide which Xid we should set.
-rw-r----- mysql mysql Aug : mysql-bin.index //As there're no other transactions found in mysql-bin.000023.The last "Xid = 28" is what we need to set on node zlm4.
[root@zlm4 :: /data/mysql/mysql3308/data]
#vim grastate.dat [root@zlm4 :: /data/mysql/mysql3308/data]
#cat grastate.dat
#cat grastate.dat
# GALERA saved state
version: 2.1
uuid: bd5525ab-9a15-11e8-aa0f-4b830c783fc7
seqno:
safe_to_bootstrap: [root@zlm4 :: /data/mysql/mysql3308/data]
#ls -l|grep grastate.dat
-rw-r--r-- root root Aug : grastate.dat [root@zlm4 :: /data/mysql/mysql3308/data]
#chown mysql.mysql grastate.dat [root@zlm4 :: /data/mysql/mysql3308/data]
#ls -l|grep grastate.dat
-rw-r--r-- mysql mysql Aug : grastate.dat
[root@zlm4 :: /data/mysql/mysql3308]
#vim my3308.cnf [root@zlm4 :: /data/mysql/mysql3308]
#cat my3308.cnf |grep wsrep
loose-wsrep_cluster_name=pxc_wubx
loose-wsrep_cluster_address=gcomm://192.168.1.101,192.168.1.102,192.168.1.103
loose-wsrep_node_address=192.168.1.103
loose-wsrep_provider=/usr/local/mysql/lib/libgalera_smm.so
#loose-wsrep_sst_method=xtrabackup-v2
loose-wsrep_sst_method=rsync
loose-wsrep_sst_auth=sst:zlmzlm
#loose-wsrep_debug=on
#loose-wsrep_provider_options="debug=on"
[root@zlm4 :: /data/mysql/mysql3308]
#!ps
ps aux|grep mysqld
mysql 12.0 19.1 pts/ Dl : : mysqld --defaults-file=/data/mysql/mysql3308/my3308.cnf
root 0.0 0.0 pts/ R+ : : grep --color=auto mysqld //Check the error log for detail.
[root@zlm4 :: /data/mysql/mysql3308/data]
#tail -f error.log --09T11::09.518383+: [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
--09T11::09.519740+: [Warning] Insecure configuration for --secure-file-priv: Location is accessible to all OS users. Consider choosing a different directory.
--09T11::09.519805+: [Note] mysqld (mysqld 5.7.--29.26-log) starting as process ...
--09T11::09.522792+: [Note] WSREP: Setting wsrep_ready to false
--09T11::09.522812+: [Note] WSREP: No pre-stored wsrep-start position found. Skipping position initialization.
--09T11::09.522818+: [Note] WSREP: wsrep_load(): loading provider library '/usr/local/mysql/lib/libgalera_smm.so'
--09T11::09.528196+: [Note] WSREP: wsrep_load(): Galera 3.26(r) by Codership Oy <info@codership.com> loaded successfully.
--09T11::09.528328+: [Note] WSREP: CRC-32C: using hardware acceleration.
--09T11::09.528860+: [Note] WSREP: Found saved state: bd5525ab-9a15-11e8-aa0f-4b830c783fc7:, safe_to_bootstrap:
--09T11::09.534206+: [Note] WSREP: Passing config to GCS: base_dir = /data/mysql/mysql3308/data/; base_host = 192.168.1.103; base_port = ; cert.log_conflicts = no; debug = no; evs.auto_evict = ; 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 = ; evs.send_window = ; evs.stats_report_period = PT1M; evs.suspect_timeout = PT5S; evs.user_send_window = ; evs.view_forget_timeout = PT24H; gcache.dir = /data/mysql/mysql3308/data/; gcache.freeze_purge_at_seqno = -; gcache.keep_pages_count = ; gcache.keep_pages_size = ; gcache.mem_size = ; gcache.name = /data/mysql/mysql3308/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 = 8; socket.checksum = 2; socket.recv_buf_size = 212992;
--09T11::09.547103+: [Note] WSREP: GCache history reset: bd5525ab-9a15-11e8-aa0f-4b830c783fc7: -> bd5525ab-9a15-11e8-aa0f-4b830c783fc7:
--09T11::09.551477+: [Note] WSREP: Assign initial position for certification: , protocol version: -
--09T11::09.551517+: [Note] WSREP: Preparing to initiate SST/IST
--09T11::09.551524+: [Note] WSREP: Starting replication
--09T11::09.551542+: [Note] WSREP: Setting initial position to bd5525ab-9a15-11e8-aa0f-4b830c783fc7:
--09T11::09.551666+: [Note] WSREP: Using CRC-32C for message checksums.
--09T11::09.551752+: [Note] WSREP: gcomm thread scheduling priority set to other:
--09T11::09.551861+: [Warning] WSREP: Fail to access the file (/data/mysql/mysql3308/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
--09T11::09.551870+: [Note] WSREP: Restoring primary-component from disk failed. Either node is booting for first time or re-booting after a graceful shutdown
--09T11::09.552488+: [Note] WSREP: GMCast version
--09T11::09.553245+: [Note] WSREP: (fe2c0efc, 'tcp://0.0.0.0:4567') listening at tcp://0.0.0.0:4567
--09T11::09.553297+: [Note] WSREP: (fe2c0efc, 'tcp://0.0.0.0:4567') multicast: , ttl:
--09T11::09.553883+: [Note] WSREP: EVS version
--09T11::09.554031+: [Note] WSREP: gcomm: connecting to group 'pxc_wubx', peer '192.168.1.101:,192.168.1.102:,192.168.1.103:'
--09T11::09.555884+: [Note] WSREP: (fe2c0efc, 'tcp://0.0.0.0:4567') connection established to fe2c0efc tcp://192.168.1.103:4567
--09T11::09.555917+: [Warning] WSREP: (fe2c0efc, 'tcp://0.0.0.0:4567') address 'tcp://192.168.1.103:4567' points to own listening address, blacklisting
--09T11::09.557320+: [Note] WSREP: (fe2c0efc, 'tcp://0.0.0.0:4567') connection established to 13eae368 tcp://192.168.1.101:4567
--09T11::09.557398+: [Note] WSREP: (fe2c0efc, 'tcp://0.0.0.0:4567') turning message relay requesting on, nonlive peers:
--09T11::09.558019+: [Note] WSREP: (fe2c0efc, 'tcp://0.0.0.0:4567') connection established to 23fb8f7a tcp://192.168.1.102:4567
--09T11::09.789760+: [Note] WSREP: declaring 13eae368 at tcp://192.168.1.101:4567 stable
--09T11::09.789795+: [Note] WSREP: declaring 23fb8f7a at tcp://192.168.1.102:4567 stable
--09T11::10.791694+: [Note] WSREP: Node 13eae368 state primary
--09T11::10.793677+: [Note] WSREP: Current view of cluster as seen by this node
view (view_id(PRIM,13eae368,)
memb {
13eae368,
23fb8f7a,
fe2c0efc,
}
joined {
}
left {
}
partitioned {
}
)
--09T11::10.793720+: [Note] WSREP: Save the discovered primary-component to disk
--09T11::11.055114+: [Note] WSREP: gcomm: connected
--09T11::11.055201+: [Note] WSREP: Shifting CLOSED -> OPEN (TO: )
--09T11::11.055278+: [Note] WSREP: Waiting for SST/IST to complete.
--09T11::11.055571+: [Note] WSREP: New COMPONENT: primary = yes, bootstrap = no, my_idx = , memb_num =
--09T11::11.055600+: [Note] WSREP: STATE EXCHANGE: Waiting for state UUID.
--09T11::11.055637+: [Note] WSREP: STATE EXCHANGE: sent state msg: fee39480-9bb4-11e8-a6f3-7b3d75fc5b99
--09T11::11.055645+: [Note] WSREP: STATE EXCHANGE: got state msg: fee39480-9bb4-11e8-a6f3-7b3d75fc5b99 from (zlm2)
--09T11::11.055653+: [Note] WSREP: STATE EXCHANGE: got state msg: fee39480-9bb4-11e8-a6f3-7b3d75fc5b99 from (zlm3)
--09T11::11.061999+: [Note] WSREP: STATE EXCHANGE: got state msg: fee39480-9bb4-11e8-a6f3-7b3d75fc5b99 from (zlm4)
--09T11::11.062036+: [Note] WSREP: Quorum results:
version = ,
component = PRIMARY,
conf_id = ,
members = / (primary/total),
act_id = ,
last_appl. = -,
protocols = // (gcs/repl/appl),
group UUID = bd5525ab-9a15-11e8-aa0f-4b830c783fc7
--09T11::11.062046+: [Note] WSREP: Flow-control interval: [, ]
--09T11::11.062050+: [Note] WSREP: Trying to continue unpaused monitor
--09T11::11.062055+: [Note] WSREP: Restored state OPEN -> JOINED ()
--09T11::11.062282+: [Note] WSREP: REPL Protocols: (, )
--09T11::11.062308+: [Note] WSREP: New cluster view: global state: bd5525ab-9a15-11e8-aa0f-4b830c783fc7:, view# : Primary, number of nodes: , my index: , protocol version
--09T11::11.062314+: [Note] WSREP: Setting wsrep_ready to true
--09T11::11.062329+: [Note] WSREP: SST complete, seqno:
--09T11::11.063803+: [Note] WSREP: Member 2.0 (zlm4) synced with group.
--09T11::11.063831+: [Note] WSREP: Shifting JOINED -> SYNCED (TO: )
--09T11::11.066318+: [Warning] InnoDB: Using innodb_locks_unsafe_for_binlog is DEPRECATED. This option may be removed in future releases. Please use READ COMMITTED transaction isolation level instead; Please refer to http://dev.mysql.com/doc/refman/5.7/en/set-transaction.html
--09T11::11.066413+: [Note] InnoDB: PUNCH HOLE support available
--09T11::11.066426+: [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
--09T11::11.066439+: [Note] InnoDB: Uses event mutexes
--09T11::11.066444+: [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
--09T11::11.066448+: [Note] InnoDB: Compressed tables use zlib 1.2.
--09T11::11.066453+: [Note] InnoDB: Using Linux native AIO
--09T11::11.066471+: [Note] InnoDB: Adjusting innodb_buffer_pool_instances from to since innodb_buffer_pool_size is less than MiB
--09T11::11.067081+: [Note] InnoDB: Number of pools:
--09T11::11.067235+: [Note] InnoDB: Using CPU crc32 instructions
--09T11::11.068926+: [Note] InnoDB: Initializing buffer pool, total size = 100M, instances = , chunk size = 100M
--09T11::11.071673+: [Note] InnoDB: Completed initialization of buffer pool
--09T11::11.074414+: [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
--09T11::11.093895+: [Note] InnoDB: Crash recovery did not find the parallel doublewrite buffer at /data/mysql/mysql3308/data/xb_doublewrite
--09T11::11.095767+: [Note] InnoDB: Highest supported file format is Barracuda.
--09T11::11.229162+: [Note] InnoDB: Created parallel doublewrite buffer at /data/mysql/mysql3308/data/xb_doublewrite, size bytes
--09T11::11.369285+: [Note] InnoDB: Creating shared tablespace for temporary tables
--09T11::11.369369+: [Note] InnoDB: Setting file './ibtmp1' size to MB. Physically writing the file full; Please wait ...
--09T11::11.773899+: [Note] InnoDB: File './ibtmp1' size is now MB.
--09T11::11.774714+: [Note] InnoDB: redo rollback segment(s) found. redo rollback segment(s) are active.
--09T11::11.774734+: [Note] InnoDB: non-redo rollback segment(s) are active.
--09T11::11.775107+: [Note] InnoDB: Waiting for purge to start
--09T11::11.845618+: [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.7.22-rel22 started; log sequence number 2641145
--09T11::11.845884+: [Note] Plugin 'FEDERATED' is disabled.
--09T11::11.848626+: [Note] InnoDB: Loading buffer pool(s) from /data/mysql/mysql3308/data/ib_buffer_pool
--09T11::11.882535+: [Note] InnoDB: Buffer pool(s) load completed at ::
--09T11::11.907836+: [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
--09T11::11.907856+: [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
--09T11::11.908353+: [Warning] CA certificate ca.pem is self signed.
--09T11::11.908405+: [Note] Skipping generation of RSA key pair as key files are present in data directory.
--09T11::11.908482+: [Note] Server hostname (bind-address): '*'; port:
--09T11::11.908505+: [Note] IPv6 is available.
--09T11::11.908513+: [Note] - '::' resolves to '::';
--09T11::11.908527+: [Note] Server socket created on IP: '::'.
--09T11::11.910446+: [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
--09T11::11.910481+: [Warning] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
--09T11::11.910489+: [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
--09T11::11.910495+: [Warning] 'user' entry 'sst@localhost' ignored in --skip-name-resolve mode.
--09T11::11.910512+: [Warning] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
--09T11::11.910516+: [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
--09T11::11.910522+: [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
--09T11::11.911126+: [Warning] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
--09T11::11.911142+: [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
--09T11::11.913579+: [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--relay-log=zlm4-relay-bin' to avoid this problem.
--09T11::11.925857+: [Note] Event Scheduler: Loaded events
--09T11::11.926371+: [Note] mysqld: ready for connections.
Version: '5.7.22-22-29.26-log' socket: '/tmp/mysql3308.sock' port: Percona XtraDB Cluster binary (GPL) 5.7.-29.26, Revision da86071, wsrep_29.
--09T11::11.930200+: [Note] WSREP: Initialized wsrep sidno
--09T11::11.930223+: [Note] WSREP: Auto Increment Offset/Increment re-align with cluster membership change (Offset: -> ) (Increment: -> )
--09T11::11.930233+: [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
--09T11::11.930250+: [Note] WSREP: Assign initial position for certification: , protocol version:
--09T11::11.930317+: [Note] WSREP: Service thread queue flushed.
--09T11::11.930499+: [Note] WSREP: Synchronized with group, ready for connections
--09T11::11.930505+: [Note] WSREP: Setting wsrep_ready to true
--09T11::11.930507+: [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
--09T11::13.056460+: [Note] WSREP: (fe2c0efc, 'tcp://0.0.0.0:4567') turning message relay requesting off
(zlm@192.168.1.103 )[(none)]>show global status like '%wsrep%';
+----------------------------------+----------------------------------------------------------+
| Variable_name | Value |
+----------------------------------+----------------------------------------------------------+
| wsrep_local_state_uuid | bd5525ab-9a15-11e8-aa0f-4b830c783fc7 |
| wsrep_protocol_version | |
| wsrep_last_applied | |
| wsrep_last_committed | |
| wsrep_replicated | |
| wsrep_replicated_bytes | |
| wsrep_repl_keys | |
| wsrep_repl_keys_bytes | |
| wsrep_repl_data_bytes | |
| wsrep_repl_other_bytes | |
| wsrep_received | |
| wsrep_received_bytes | |
| wsrep_local_commits | |
| wsrep_local_cert_failures | |
| wsrep_local_replays | |
| wsrep_local_send_queue | |
| wsrep_local_send_queue_max | |
| wsrep_local_send_queue_min | |
| wsrep_local_send_queue_avg | 0.000000 |
| wsrep_local_recv_queue | |
| wsrep_local_recv_queue_max | |
| wsrep_local_recv_queue_min | |
| wsrep_local_recv_queue_avg | 0.000000 |
| wsrep_local_cached_downto | |
| wsrep_flow_control_paused_ns | |
| wsrep_flow_control_paused | 0.000000 |
| wsrep_flow_control_sent | |
| wsrep_flow_control_recv | |
| wsrep_flow_control_interval | [ , ] |
| wsrep_flow_control_interval_low | |
| wsrep_flow_control_interval_high | |
| wsrep_flow_control_status | OFF |
| wsrep_cert_deps_distance | 0.000000 |
| wsrep_apply_oooe | 0.000000 |
| wsrep_apply_oool | 0.000000 |
| wsrep_apply_window | 0.000000 |
| wsrep_commit_oooe | 0.000000 |
| wsrep_commit_oool | 0.000000 |
| wsrep_commit_window | 0.000000 |
| wsrep_local_state | |
| wsrep_local_state_comment | Synced |
| wsrep_cert_index_size | |
| wsrep_cert_bucket_count | |
| wsrep_gcache_pool_size | |
| wsrep_causal_reads | |
| wsrep_cert_interval | 0.000000 |
| wsrep_ist_receive_status | |
| wsrep_ist_receive_seqno_start | |
| wsrep_ist_receive_seqno_current | |
| wsrep_ist_receive_seqno_end | |
| wsrep_incoming_addresses | 192.168.1.101:,192.168.1.102:,192.168.1.103: |
| wsrep_desync_count | |
| wsrep_evs_delayed | |
| wsrep_evs_evict_list | |
| wsrep_evs_repl_latency | //// |
| wsrep_evs_state | OPERATIONAL |
| wsrep_gcomm_uuid | fe2c0efc-9bb4-11e8-82b0-6b01a1a0030d |
| wsrep_cluster_conf_id | |
| wsrep_cluster_size | | //The size of PXC turned out to be three again.
| wsrep_cluster_state_uuid | bd5525ab-9a15-11e8-aa0f-4b830c783fc7 |
| wsrep_cluster_status | Primary |
| wsrep_connected | ON |
| wsrep_local_bf_aborts | |
| wsrep_local_index | |
| wsrep_provider_name | Galera |
| wsrep_provider_vendor | Codership Oy <info@codership.com> |
| wsrep_provider_version | 3.26(r) |
| wsrep_ready | ON |
+----------------------------------+----------------------------------------------------------+
rows in set (0.00 sec) (zlm@192.168.1.103 )[(none)]>select * from zlm.t1;
+----+------------+
| id | name |
+----+------------+
| | MySQL |
| | Oracle |
| | PostgreSQL |
| | Redis |
+----+------------+
rows in set (0.01 sec) //The fourth record of "Redis" has been shown correctly on node zlm4.
(zlm@192.168.1.103 )[(none)]>show slave status\G
*************************** . row ***************************
Slave_IO_State:
Master_Host: 192.168.1.102
Master_User: repl
Master_Port:
Connect_Retry:
Master_Log_File: mysql-bin.
Read_Master_Log_Pos:
Relay_Log_File: zlm4-relay-bin.
Relay_Log_Pos:
Relay_Master_Log_File: mysql-bin.
Slave_IO_Running: No
Slave_SQL_Running: No
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno:
Last_Error:
Skip_Counter:
Exec_Master_Log_Pos:
Relay_Log_Space:
Until_Condition: None
Until_Log_File:
Until_Log_Pos:
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno:
Last_IO_Error:
Last_SQL_Errno:
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id:
Master_UUID: 3ba41aa7-9b79-11e8-ad75-080027de0e0e
Master_Info_File: /data/mysql/mysql3308/data/master.info
SQL_Delay:
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State:
Master_Retry_Count:
Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp:
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set: 42aada54-65ea-ee17-55f0-b47cf387c038:-
Executed_Gtid_Set: 42aada54-65ea-ee17-55f0-b47cf387c038:-
Auto_Position:
Replicate_Rewrite_DB:
Channel_Name:
Master_TLS_Version:
row in set (0.00 sec) (zlm@192.168.1.103 )[(none)]>reset slave all;
Query OK, rows affected (0.03 sec) (zlm@192.168.1.103 )[(none)]>show slave status\G
Empty set (0.00 sec) //This step is merely used to make the environment clean and tidy.It's not necessary.
在PXC中重新添加掉线节点的更多相关文章
- vue,在模块中动态添加dom节点,并监听
在这里,onclick事件没有作用,因为它指向的是window,如果写为this.click页面显示为undefined, 我采用的是通过class绑定事件,但是会有一个问题,那就是当你渲染多个事件时 ...
- vue中动态添加div
知识点:vue中动态添加div节点,点击添加,动态生成div,点击删除,删除对应的div,其中数组的长度是动态改变的,如在from表单中应用,直接在提交方法中,获得list,获取所填的元素即可 效果: ...
- angularjs中向html页面添加内容节点元素代码段的两种方法
第一种方式:原生JS向html页面添加内容节点元素代码段: <!DOCTYPE html> <html> <head> <meta charset=" ...
- Idea开发环境中,开发springboot类型的项目,如果只引入parent节点,不添加依赖节点,maven是不会加载springboot的任何依赖的
在SpringBoot类型的项目中,我本来是要使用pringBoot,创建一个Console项目,我原本在pom.xml中添加paren节点了,天真的认为不需要再添加其他任何依赖了,可是接下来的1个小 ...
- 使用percona xtradb cluster的IST方式添加新节点
使用percona xtradb cluster的IST(Incremental State Transfer)特性添加新节点,防止新节点加入时使用SST(State SnapShop Transfe ...
- Hadoop日常维护系列——Hadoop添加删除节点
添加节点 1.修改host 和普通的datanode一样.添加namenode的ip 2.修改namenode的配置文件conf/slaves 添加新增节点的ip或host 3.在新节点的 ...
- asp.net中web.config配置节点大全详解
最近网上找了一些关于Web.config配置节点的文章,发现很多都写的都比较零散,而且很少有说明各个配置节点的作用和用法.搜索了一下发现有一篇写的不错,这里引用一下 原文地址 http://www.c ...
- HTML5中新添加事件
HTML5中新添加了很多事件,但是由于他们的兼容问题不是很理想,应用实战性不是太强,所以在这里基本省略,咱们只分享应用广泛兼容不错的事件,日后随着兼容情况提升以后再陆续添加分享.今天为大家介绍的事件主 ...
- openstack中彻底删除计算节点的操作记录
在使用openstack的过程中,我们经常会添加好几台计算节点来部署虚拟机,在后续使用中由于某些原因,一些计算节点出现了问题,需要将这些出了问题的计算节点从openstack的控制节点中踢出去!但是很 ...
随机推荐
- HashMap中的equals和hashCode
HashMap的存储方式 HashMap的实现方式是数组链,不同的对象根据其哈希码(hashCode方法的返回值)找到对应的数组下标,然后存入数组.不同的对象有相同的哈希码时怎么办?这就由数组链中的链 ...
- FastJSON、Gson、Jackson(简单了解使用)
下载地址(maven) Jackson:http://mvnrepository.com/search?q=jackson FastJson:http://mvnrepository.com/sear ...
- SpringBoot非官方教程 | 第十九篇: 验证表单信息
转载请标明出处: 原文首发于:https://www.fangzhipeng.com/springboot/2017/07/11/springboot19/ 本文出自方志朋的博客 这篇文篇主要简述如何 ...
- Oracle中的一些查询语句及其执行顺序
查询条件: 1)LIKE:模糊查询,需要借助两个通配符,%:表示0到多个字符:_:标识单个字符. 2)IN(list):用来取出符合列表范围中的数据. 3)NOT IN(list): 取出不符合此列表 ...
- dual表详解
dual是一个虚拟表,用来构成select的语法规则,oracle保证dual里面永远只有一条记录.我们可以用它来做很多事情,如下: 1.查看当前用户 SQL> select user from ...
- 原生js方面的兼容性问题
1.关于获取行外样式 currentStyle 和 getComputedStyle 出现的兼容性问题 我们都知道js通过style不可以获取行外样式,当我们需要获取行外样式时: 我们一般通过这两 ...
- MySql Connector/C++8结果集处理Demo
#include <iostream> #include <exception> #include <mysqlx/xdevapi.h> using std::co ...
- java连接Redis初始化jedis失败!
Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstant ...
- Solr6.6.0添加IK中文分词器
IK分词器就是一款中国人开发的,扩展性很好的中文分词器,它支持扩展词库,可以自己定制分词项,这对中文分词无疑是友好的. jar包下载链接:http://pan.baidu.com/s/1o85I15o ...
- Python语言与其他语言对比
python作为一门高级编程语言,它的诞生虽然很偶然,但是它得到程序员的喜爱却是必然之路,以下是Python与其他编程语言的优缺点对比: 一:简介 1.Python 优势:简单易学,能够把用其他语言制 ...