I am trying to configure sql group replication between 2 vps, one being a non AWS Lightsail instance and acting as primary.
However I cannot seem to be able to get the Lightsail instance working. It launched without problems on the primary, but when I try to start the group replication on the Lightsail server
START GROUP_REPLICATION;
ERROR 2013 (HY000): Lost connection to MySQL server during query
(timemout is set to 20)
Ports 3306 and 33061 are open both servers in ufw and also open on the AWS Lightsail's firewall.
my.cnf on Lightsail looks like this
# Shared replication group configuration
loose-group_replication_group_name = "<uuid>"
loose-group_replication_ip_whitelist = "<primary_static_public_ip>,<lightsail_static_public_ip>"
loose-group_replication_group_seeds = "<primary_static_public_ip>:33061,<lightsail_static_public_ip>:33061"
# Single or Multi-primary mode? Uncomment these two lines
# for multi-primary mode, where any host can accept writes
loose-group_replication_single_primary_mode = OFF
loose-group_replication_enforce_update_everywhere_checks = ON
# Host specific replication configuration
server_id = 2
bind-address = "0.0.0.0"
report_host = "<lightsail_static_public_ip>"
loose-group_replication_local_address = "<lightsail_static_public_ip>:33061"
On the primary I only use the primary's address and whitelist Lightsail public address. I cannot figure out why it refuses to connect.
I could however connect from Lightsail to primary using mysql -h
command and the replication username.