title: Error ERROR 2013 (HY000): Lost connection to MySQL server during query setting up group replication on Lightsail
body: <p>I am trying to configure sql group replication between 2 vps, one being a non AWS Lightsail instance and acting as primary.</p>
  <p>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</p>
  <pre><code>START GROUP_REPLICATION; 
  ERROR 2013 (HY000): Lost connection to MySQL server during query
  </code></pre>
  <p>(timemout is set to 20)</p>
  <p>Ports 3306 and 33061 are open both servers in ufw and also open on the AWS Lightsail's firewall.</p>
  <p>my.cnf on Lightsail looks like this</p>
  <pre><code># Shared replication group configuration
  loose-group_replication_group_name = &quot;&lt;uuid&gt;&quot;
  loose-group_replication_ip_whitelist = &quot;&lt;primary_static_public_ip&gt;,&lt;lightsail_static_public_ip&gt;&quot;
  loose-group_replication_group_seeds = &quot;&lt;primary_static_public_ip&gt;:33061,&lt;lightsail_static_public_ip&gt;:33061&quot;
  
  # 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 = &quot;0.0.0.0&quot;
  report_host = &quot;&lt;lightsail_static_public_ip&gt;&quot;
  loose-group_replication_local_address = &quot;&lt;lightsail_static_public_ip&gt;:33061&quot;
  </code></pre>
  <p>On the primary I only use the primary's address and whitelist Lightsail public address. I cannot figure out why it refuses to connect.</p>
  <p>I could however connect from Lightsail to primary using <code>mysql -h</code> command and the replication username.</p>