InnoDB cluster environment UUID is different on node:
To fix it stop group replication, remove instance (use force if require), add instance back
Identify the node which is not in sync:
Execute following SQL statement on each node and identify the node has different UUID on all nodes.
mysql> select * from mysql_innodb_cluster_metadata.instances;
Stop group replication:
Stop group replication on the node which does not have same UUID on all nodes.
mysql > stop GROUP_REPLICATION;
Remove instances from cluster:
Remove all secondary node from the cluster and add them back if require.
$mysqlsh
JS >\c root@<IP_Address>:<Port_No>
JS > dba.getCluster().status()
JS > dba.getCluster ()
<Cluster:cluster_name>
JS > var cluster = dba.getCluster("cluster_name");
JS > cluster.removeInstance('root@<IP_Address>:<Port_No>');
If you get "Cluster.removeInstance: Timeout reached waiting......"
JS > cluster.removeInstance('root@<IP_Address>:<Port_No>',{force: true})
Add instance to cluster:
JS > cluster.addInstance('root@<IP_Address>:<Port_No>');
To fix it stop group replication, remove instance (use force if require), add instance back
Identify the node which is not in sync:
Execute following SQL statement on each node and identify the node has different UUID on all nodes.
mysql> select * from mysql_innodb_cluster_metadata.instances;
Stop group replication:
Stop group replication on the node which does not have same UUID on all nodes.
mysql > stop GROUP_REPLICATION;
Remove instances from cluster:
Remove all secondary node from the cluster and add them back if require.
$mysqlsh
JS >\c root@<IP_Address>:<Port_No>
JS > dba.getCluster().status()
JS > dba.getCluster ()
<Cluster:cluster_name>
JS > var cluster = dba.getCluster("cluster_name");
JS > cluster.removeInstance('root@<IP_Address>:<Port_No>');
If you get "Cluster.removeInstance: Timeout reached waiting......"
JS > cluster.removeInstance('root@<IP_Address>:<Port_No>',{force: true})
Add instance to cluster:
JS > cluster.addInstance('root@<IP_Address>:<Port_No>');
This comment has been removed by the author.
ReplyDeleteManaging and optimizing MySQL InnoDB clusters is key to ensuring high availability and performance. Whether you're removing an instance forcefully or adding a new one, using the right commands in MySQL Shell can make the process smooth and efficient. For a more streamlined and optimized experience, platforms like Raw Accel can be very helpful. This guide is perfect for database administrators looking to maintain and enhance their InnoDB clusters!
ReplyDelete