MySQL Shell 9.4
        If an InnoDB Cluster is part of an InnoDB ClusterSet
        deployment, MySQL Shell automatically restores it to its role
        in the topology immediately after a reboot, provided that it is
        functioning acceptably and has not been marked as invalidated.
        However, if a cluster has been marked as invalidated or its
        ClusterSet replication channel has stopped, you must use a
        clusterSet.rejoinCluster()
        The
        clusterSet.rejoinCluster()
The cluster has previously been a member of the ClusterSet.
The cluster has quorum (sufficient members are online to form a majority).
The cluster's primary server is reachable.
The cluster is not holding any metadata locks or InnoDB transaction locks.
            The cluster's GTID set
            (gtid_executed) contains no
            extra transactions compared to the active members of the
            ClusterSet, with the exception of view change events. These
            Group Replication internal transactions are identified by
            the UUID specified by the
            group_replication_view_change_uuid
            system variable, and the cluster rejoin process can
            reconcile them.
          
        If the cluster meets these requirements, the operation restarts
        the ClusterSet replication channel and removes the
        INVALIDATED status. If it does not, you will
        need to fix any issues that were identified and retry the
        command.
      
Follow this procedure to rejoin an InnoDB Cluster to the InnoDB ClusterSet:
            Using MySQL Shell, connect to any member server in the
            primary cluster or in one of the replica clusters, using an
            InnoDB Cluster administrator account (created with
            cluster.setupAdminAccount()ClusterSet object using
            dba.getClusterSet() or
            cluster.getClusterSet()ClusterSet object has the correct
            permissions. For example:
          
mysql-js>\connect admin2@127.0.0.1:3310Creating a session to 'admin2@127.0.0.1:3310' Please provide the password for 'admin2@127.0.0.1:3310': ******** Save password for 'admin2@127.0.0.1:3310'? [Y]es/[N]o/Ne[v]er (default No): Fetching schema names for autocompletion... Press ^C to stop. Closing old connection... Your MySQL connection id is 28 Server version: 8.0.27-commercial MySQL Enterprise Server - Commercial No default schema selected; type \use <schema> to set one. <ClassicSession:admin2@127.0.0.1:3310> mysql-js>myclusterset = dba.getClusterSet()<ClusterSet:testclusterset>
            Check the status of the whole deployment using AdminAPI's
            clusterSet.status()
mysql-js> myclusterset.status({extended: 1})
For an explanation of the output, see Section 9.7, “InnoDB ClusterSet Status and Topology”.
            Issue a
            clusterSet.rejoinCluster()
mysql-js> myclusterset.rejoinCluster('clustertwo')
Rejoining cluster 'clustertwo' to the clusterset
NOTE: Cluster 'clustertwo' is invalidated
* Updating metadata
* Rejoining cluster
** Changing replication source of 127.0.0.1:4420 to 127.0.0.1:3310
** Changing replication source of 127.0.0.1:4430 to 127.0.0.1:3310
** Changing replication source of 127.0.0.1:4410 to 127.0.0.1:3310
Cluster 'clustertwo' was rejoined to the clusterset
            For the
            clusterSet.rejoinCluster()
                The clusterName parameter is
                required and specifies the identifier used for the
                cluster in the InnoDB ClusterSet, as given in the
                output from the
                clusterSet.status()clustertwo
                Use the dryRun option if you want to
                carry out validations and log the changes without
                actually executing them.
              
            When you issue the
            clusterSet.rejoinCluster()
Checks whether the ClusterSet replication channel is replicating from the current primary cluster, and reconfigures it to do that if it isn't already.
Resets the replication user's password.
Restarts the ClusterSet replication channel.
                Clears the INVALIDATED status for the
                cluster.
              
The target cluster rejoins the InnoDB ClusterSet as a replica cluster, even if it was previously a primary cluster. A controlled switchover is required if you want to make the target cluster into the primary cluster.
            Note that if the target cluster has members that are not
            online or not reachable when you issue the
            clusterSet.rejoinCluster()cluster.removeInstance()clusterSet.rejoinCluster()
            Issue a
            clusterSet.status()extended option, to
            verify the status of the InnoDB ClusterSet deployment.
          
            If you do want to make the rejoined cluster into the primary
            cluster, issue a
            clusterSet.setPrimaryCluster()