I am trying to set up MySQL group replication. Only problem is, that when I try to start replication group, It starts with super_read_only.
Here the configurations in my.cnf
file
(mysqld)
max_binlog_size = 4096
default_authentication_plugin = mysql_native_password
log_bin = mysql-bin-1.log
enforce_gtid_consistency = ON
gtid_mode = ON
log_slave_updates = ON
binlog_checksum = NONE
plugin-load-add = group_replication.so
plugin-load-add = mysql_clone.so
relay_log_recovery = ON
transaction_write_set_extraction = XXHASH64
loose_group_replication_start_on_boot = OFF
loose_group_replication_group_name = 74fe8890-679f-4e93-9169-a7edfbc1d427
loose_group_replication_group_seeds = mysql_cluster_mysql0_1:3306, mysql_cluster_mysql1_1:3306, mysql_cluster_mysql2_1:3306
loose_group_replication_single_primary_mode = ON
loose_group_replication_enforce_update_everywhere_checks = OFF
bind-address = 0.0.0.0
instances are run inside docker, that’s why group seed addresses has these hostnames.
Also here the procedure for running master instance.
DELIMITER $$
USE `db`$$
DROP PROCEDURE IF EXISTS `set_as_master`$$
CREATE DEFINER=`root`@`%` PROCEDURE `set_as_master`()
BEGIN
SET @@GLOBAL.group_replication_bootstrap_group=1;
CREATE USER IF NOT EXISTS 'repl'@'%';
GRANT REPLICATION SLAVE ON *.* TO repl@'%';
FLUSH PRIVILEGES;
CHANGE MASTER TO MASTER_USER='root' FOR CHANNEL 'group_replication_recovery';
START GROUP_REPLICATION;
-- SELECT * FROM performance_schema.replication_group_members;
END$$
DELIMITER;
After running CALL start_as_master;
in Sqlyog, process stucks on below lines.
'CHANGE MASTER TO FOR CHANNEL 'group_replication_recovery' executed'. Previous state master_host='', master_port= 3306, master_log_file='', master_log_pos= 4, master_bind=''. New state master_host='', master_port= 3306, master_log_file='', master_log_pos= 4, master_bind=''.
2021-03-03T21:47:55.934818Z 8 (System) (MY-013587) (Repl) Plugin group_replication reported: 'Plugin 'group_replication' is starting.'
2021-03-03T21:47:55.935929Z 9 (System) (MY-011565) (Repl) Plugin group_replication reported: 'Setting super_read_only=ON.'
Why does it run with super_read_only=ON
?
Is there anything I miss during configuration or running script?
MySQL version is 8.0.23.