In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1. Initialization and startup
Mysql/bin/mysqld-initialize-insecure-basedir=/mgr/mysql-datadir=/mgr/data/s1mysql/bin/mysqld-initialize-insecure-basedir=/mgr/mysql-datadir=/mgr/data/s2mysql/bin/mysqld-initialize-insecure-basedir=/mgr/mysql-datadir=/mgr/data/s3/mgr/mysql/bin/mysqld-defaults-file=/mgr/data/s1/s1.cnf/mgr/mysql/bin/mysqld-defaults-file=/mgr/data/s2/s2 .cnf / mgr/mysql/bin/mysqld-defaults-file=/mgr/data/s3/s3.cnf
2. Within the configuration file
S1: [mysqld] # server configurationdatadir=/mgr/data/s1basedir=/mgr/mysql/user=mysqlport=24801socket=/mgr/data/s1/s1.sock#disabled_storage_engines= "MyISAM,BLACKHOLE,FEDERATED,ARCHIVE MEMORY "# Replication Frameworkserver_id=1gtid_mode=ONenforce_gtid_consistency=ONmaster_info_repository=TABLErelay_log_info_repository=TABLEbinlog_checksum=NONElog_slave_updates=ONlog_bin=binlogbinlog_format=ROW#Group Replication Settingstransaction_write_set_extraction=XXHASH64loose-group_replication_group_name=" 5c7975ec-0000-11e9-a8c9-0800273906ff "loose-group_replication_start_on_boot=offloose-group_replication_local_address=" 127.0.0.1 5c7975ec-0000 24901 "loose-group_replication_group_seeds=" 127.0.0.1 5c7975ec-0000 24901127.0.1Fran 24902127. 0.0.1 MyISAM 24903 "loose-group_replication_bootstrap_group=offs2: [mysqld] # server configurationdatadir=/mgr/data/s2basedir=/mgr/mysql/user=mysqlport=24802socket=/mgr/data/s2/s2.sock#disabled_storage_engines=" BLACKHOLE,FEDERATED,ARCHIVE MEMORY "# Replication Frameworkserver_id=2gtid_mode=ONenforce_gtid_consistency=ONmaster_info_repository=TABLErelay_log_info_repository=TABLEbinlog_checksum=NONElog_slave_updates=ONlog_bin=binlogbinlog_format=ROW#Group Replication Settingstransaction_write_set_extraction=XXHASH64loose-group_replication_group_name=" 5c7975ec-0000-11e9-a8c9-0800273906ff "loose-group_replication_start_on_boot=offloose-group_replication_local_address=" 127.0.0.1 5c7975ec-0000 24902 "loose-group_replication_group_seeds=" 127.0.0.1 Vera 24901127.0.1 Vol 24902127. 0.0.1 MyISAM 24903 "loose-group_replication_bootstrap_group=offs3: [mysqld] # server configurationdatadir=/mgr/data/s3basedir=/mgr/mysql/user=mysqlport=24803socket=/mgr/data/s3/s3.sock#disabled_storage_engines=" BLACKHOLE,FEDERATED,ARCHIVE MEMORY "# Replication Frameworkserver_id=3gtid_mode=ONenforce_gtid_consistency=ONmaster_info_repository=TABLErelay_log_info_repository=TABLEbinlog_checksum=NONElog_slave_updates=ONlog_bin=binlogbinlog_format=ROW#Group Replication Settingstransaction_write_set_extraction=XXHASH64loose-group_replication_group_name=" 5c7975ec-0000-11e9-a8c9-0800273906ff "loose-group_replication_start_on_boot=offloose-group_replication_local_address=" 127.0.0.1 5c7975ec-0000 24903 "loose-group_replication_group_seeds=" 127.0.0.1 Vera 24901127.0.1 Vol 24902127. 0.0.1PUR 24903 "loose-group_replication_bootstrap_group=off
3. Log in to MySQL to execute the command
S1 necessary process mysql > SET SQL_LOG_BIN=0;mysql > CREATE USER rpl_user@'%' IDENTIFIED BY 'password';mysql > GRANT REPLICATION SLAVE ON *. * TO rpl_user@'%';mysql > FLUSH PRIVILEGES;mysql > SET SQL_LOG_BIN=1;mysql > CHANGE MASTER TO MASTER_USER='rpl_user', MASTER_PASSWORD='password' FOR CHANNEL' group_replication_recovery';mysql > INSTALL PLUGIN group_replication SONAME 'group_replication.so';mysql > SET GLOBAL group_replication_bootstrap_group=ON;mysql > START GROUP_REPLICATION;mysql > SET GLOBAL group_replication_bootstrap_group=OFF S1 non-essential process mysql > SELECT * FROM performance_schema.replication_group_members;mysql > SHOW PLUGINS; mysql > CREATE DATABASE test;mysql > USE test;mysql > CREATE TABLE T1 (C1 INT PRIMARY KEY, c2 TEXT NOT NULL); mysql > INSERT INTO T1 VALUES (1, 'Luis'); mysql > SELECT * FROM T1 alternative MySQL > SHOW BINLOG EVENTS;mysql > exits2 essential process mysql > SET SQL_LOG_BIN=0;mysql > CREATE USER rpl_user@'%' IDENTIFIED BY' password';mysql > GRANT REPLICATION SLAVE ON *. * TO rpl_user@'%';mysql > FLUSH PRIVILEGES Mysql > SET SQL_LOG_BIN=1;mysql > CHANGE MASTER TO MASTER_USER='rpl_user', MASTER_PASSWORD='password' FOR CHANNEL 'group_replication_recovery';mysql > INSTALL PLUGIN group_replication SONAME' group_replication.so';mysql > SELECT * FROM performance_schema.replication_group_members;mysql > START GROUP_REPLICATION;mysql > SELECT * FROM performance_schema.replication_group_members;mysql > show variables like'% read_only%';s3 essential procedures mysql > SET SQL_LOG_BIN=0;mysql > CREATE USER rpl_user@'%' IDENTIFIED BY 'password' Mysql > GRANT REPLICATION SLAVE ON *. * TO rpl_user@'%';mysql > FLUSH PRIVILEGES;mysql > SET SQL_LOG_BIN=1;mysql > CHANGE MASTER TO MASTER_USER='rpl_user', MASTER_PASSWORD='password' FOR CHANNEL 'group_replication_recovery';mysql > INSTALL PLUGIN group_replication SONAME' group_replication.so';mysql > SELECT * FROM performance_schema.replication_group_members;mysql > START GROUP_REPLICATION;mysql > SELECT * FROM performance_schema.replication_group_members;mysql > show variables like'% read_only%'
4. Encounter problems
Question 1 [ERROR] unknown variable 'group_replication_group_name=5c7975ec-0000-11e9-a8c9-0800273906ff' original parameter group_replication_group_name= "5c7975ec-0000-11e9-a8c9-0800273906ff" group_replication_start_on_boot=offgroup_replication_local_address= "127.0.0.1loose- 24903" group_replication_group_seeds= "127.0.0.1 group_replication_bootstrap_group=off 24901127.0.1virtual 24902127.0.0.124903" group_replication_bootstrap_group=off modified parameter loose- Group_replication_group_name= "5c7975ec-0000-11e9-a8c9-0800273906ff" loose-group_replication_start_on_boot=offloose-group_replication_local_address= "127.0.0.1 0800273906ff 24903" loose-group_replication_group_seeds= "127.0.0.111e9-a8c9 24901127.0.0.1" loose-group_replication_bootstrap_group=off problem 2 the replication user created is inconsistent with the replication user used mysql > SELECT * user +-+ | CHANNEL_NAME | | MEMBER_ID | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE | +-- | -group_replication_applier | 5c7975ec-a9cd-11e9-a8c9-0800273906ff | mgr1 | 24801 | ONLINE | | group_replication_applier | 69908c35-a9cd-11e9-8b78-0800273906ff | mgr1 | 24802 | RECOVERING | +-- -- + original: CHANGE MASTER TO MASTER_USER='repli' MASTER_PASSWORD='repli@%' FOR CHANNEL 'group_replication_recovery' After modification, to be consistent with the created replication user CHANGE MASTER TO MASTER_USER='rpl_user', MASTER_PASSWORD='password' FOR CHANNEL 'group_replication_recovery'; question 3 does not execute START GROUP_REPLICATION; newly joined node shows offlinemysql > SELECT * FROM performance_schema.replication_group_members +-+ | CHANNEL_NAME | MEMBER_ID | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE | +- -+ | group_replication_applier | NULL | OFFLINE | +- -+ 1 row in set (0.00 sec) Post-execution mysql > START GROUP_REPLICATION Query OK, 0 rows affected (3.47 sec) mysql > SELECT * FROM performance_schema.replication_group_members +-+ | CHANNEL_NAME | | MEMBER_ID | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE | +-- | -+-+ | group_replication_applier | 5c7975ec-a9cd-11e9-a8c9-0800273906ff | mgr1 | 24801 | ONLINE | | group_replication_applier | 69908c35-a9cd-11e9-8b78-0800273906ff | mgr1 | 24802 | ONLINE | | group_replication_applier | 79ca1c48-a9cd-11e9-9526-0800273906ff | mgr1 | 24803 | ONLINE | +- -+-+ 3 rows in set (0.00 sec)
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.