Created
April 17, 2020 18:57
-
-
Save jerrac/40a9664d25b189089d7d32296b1ae5f3 to your computer and use it in GitHub Desktop.
MySQLDockerGroupReplicationIssue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[mysqld] | |
disabled_storage_engines="MyISAM,BLACKHOLE,FEDERATED,ARCHIVE,MEMORY" | |
server_id=1 | |
gtid_mode=ON | |
enforce_gtid_consistency=ON | |
binlog_checksum=NONE | |
# | |
log_bin=binlog | |
log_slave_updates=ON | |
binlog_format=ROW | |
master_info_repository=TABLE | |
relay_log_info_repository=TABLE | |
# | |
plugin_load='group_replication.so' | |
group_replication_group_name="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" | |
group_replication_start_on_boot=on | |
group_replication_local_address="mysql1:33061" | |
#group_replication_group_seeds="mysql1:33061,mysql2:33061,mysql3:33061" | |
group_replication_bootstrap_group=off | |
# | |
#relay_log_recovery=ON |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@6e4337f62d12:/# mysql -u root -p | |
Enter password: | |
Welcome to the MySQL monitor. Commands end with ; or \g. | |
Your MySQL connection id is 8 | |
Server version: 8.0.19 MySQL Community Server - GPL | |
Copyright (c) 2000, 2020, 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> CREATE USER rpl_user@'%' IDENTIFIED BY 'password'; | |
Query OK, 0 rows affected (0.01 sec) | |
mysql> GRANT REPLICATION SLAVE ON *.* TO rpl_user@'%'; | |
Query OK, 0 rows affected (0.01 sec) | |
mysql> GRANT BACKUP_ADMIN ON *.* TO rpl_user@'%'; | |
Query OK, 0 rows affected (0.01 sec) | |
mysql> FLUSH PRIVILEGES; | |
Query OK, 0 rows affected (0.00 sec) | |
mysql> CHANGE MASTER TO MASTER_USER='rpl_user', MASTER_PASSWORD='password' \\ | |
ERROR: | |
Unknown command '\\'. | |
-> FOR CHANNEL 'group_replication_recovery'; | |
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\\ | |
FOR CHANNEL 'group_replication_recovery'' at line 1 | |
mysql> INSTALL PLUGIN group_replication SONAME 'group_replication.so'; | |
Query OK, 0 rows affected (0.01 sec) | |
mysql> SET GLOBAL group_replication_group_name="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"; | |
Query OK, 0 rows affected (0.00 sec) | |
mysql> SET GLOBAL group_replication_start_on_boot=on; | |
Query OK, 0 rows affected (0.00 sec) | |
mysql> SET GLOBAL group_replication_local_address="mysql1:33061"; | |
Query OK, 0 rows affected (0.00 sec) | |
mysql> SET GLOBAL group_replication_bootstrap_group=ON; | |
Query OK, 0 rows affected (0.00 sec) | |
mysql> START GROUP_REPLICATION; | |
Query OK, 0 rows affected (3.13 sec) | |
mysql> SET GLOBAL group_replication_bootstrap_group=OFF; | |
Query OK, 0 rows affected (0.00 sec) | |
mysql> CHANGE MASTER TO MASTER_USER='rpl_user', MASTER_PASSWORD='password' FOR CHANNEL 'group_replication_recovery'; | |
Query OK, 0 rows affected, 2 warnings (0.04 sec) | |
mysql> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[mysqld] | |
disabled_storage_engines="MyISAM,BLACKHOLE,FEDERATED,ARCHIVE,MEMORY" | |
server_id=2 | |
gtid_mode=ON | |
enforce_gtid_consistency=ON | |
binlog_checksum=NONE | |
# | |
log_bin=binlog | |
log_slave_updates=ON | |
binlog_format=ROW | |
master_info_repository=TABLE | |
relay_log_info_repository=TABLE | |
# | |
plugin_load='group_replication.so' | |
group_replication_group_name="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" | |
#group_replication_start_on_boot=on | |
group_replication_local_address="mysql2:33061" | |
group_replication_group_seeds="mysql1:33061,mysql2:33061" | |
group_replication_bootstrap_group=off | |
# | |
#relay_log_recovery=ON |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@1b5a1ec60044:/# mysql -u root -p | |
Enter password: | |
Welcome to the MySQL monitor. Commands end with ; or \g. | |
Your MySQL connection id is 8 | |
Server version: 8.0.19 MySQL Community Server - GPL | |
Copyright (c) 2000, 2020, 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> INSTALL PLUGIN group_replication SONAME 'group_replication.so'; | |
Query OK, 0 rows affected (0.01 sec) | |
mysql> SET GLOBAL group_replication_local_address="mysql2:33061"; | |
Query OK, 0 rows affected (0.00 sec) | |
mysql> SET GLOBAL group_replication_group_seeds="mysql1:33061,mysql2:33061" | |
-> ; | |
Query OK, 0 rows affected (0.00 sec) | |
mysql> CHANGE MASTER TO MASTER_USER='rpl_user', MASTER_PASSWORD='password' FOR CHANNEL 'group_replication_recovery'; | |
Query OK, 0 rows affected, 2 warnings (0.03 sec) | |
mysql> START GROUP_REPLICATION; | |
ERROR 3092 (HY000): The server is not configured properly to be an active member of the group. Please see more details on error log. | |
mysql> SET GLOBAL group_replication_group_seeds="mysql1:33061" | |
-> ; | |
Query OK, 0 rows affected (0.00 sec) | |
mysql> START GROUP_REPLICATION; | |
ERROR 3092 (HY000): The server is not configured properly to be an active member of the group. Please see more details on error log. | |
mysql> get sql_log_bin | |
-> ; | |
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'sql_log_bin' at line 1 | |
mysql> SET GLOBAL group_replication_group_name="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"; | |
Query OK, 0 rows affected (0.00 sec) | |
mysql> SET GLOBAL group_replication_start_on_boot=on; | |
Query OK, 0 rows affected (0.00 sec) | |
mysql> SET GLOBAL group_replication_group_name="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"; | |
Query OK, 0 rows affected (0.00 sec) | |
mysql> SET GLOBAL group_replication_start_on_boot=on; | |
Query OK, 0 rows affected (0.00 sec) | |
mysql> SET GLOBAL group_replication_local_address="mysql2:33061"; | |
Query OK, 0 rows affected (0.00 sec) | |
mysql> SET GLOBAL group_replication_group_seeds="mysql1:33061,mysql2:33061"; | |
Query OK, 0 rows affected (0.00 sec) | |
mysql> SET GLOBAL group_replication_bootstrap_group=off; | |
Query OK, 0 rows affected (0.00 sec) | |
mysql> START GROUP_REPLICATION; | |
ERROR 3092 (HY000): The server is not configured properly to be an active member of the group. Please see more details on error log. | |
mysql> SET GLOBAL group_replication_group_seeds="mysql1:33061"; | |
Query OK, 0 rows affected (0.00 sec) | |
mysql> START GROUP_REPLICATION; | |
ERROR 3092 (HY000): The server is not configured properly to be an active member of the group. Please see more details on error log. | |
mysql> SET GLOBAL group_replication_group_seeds="mysql1:33061"; | |
Query OK, 0 rows affected (0.00 sec) | |
mysql> START GROUP_REPLICATION; ERROR 3092 (HY000): The server is not configured properly to be an active member of the group. Please see more details on error log. | |
mysql> quit; | |
Bye | |
root@1b5a1ec60044:/# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment