I was setting up the MySQL InnoDB cluster, when I got this error. I created the cluster from the primary node, the
cluster.status() was giving output as
'ONLINE' at this point with only one node part of the cluster (all good till here). But when I tried adding a node in the cluster I got the error:
“Cluster.addInstance: Cannot add an instance with the same server
UUID (db3fdca5-3e67-11e9-98d3-42010a940021) of an active member of the
cluster ‘10.148.0.38:3306’. Please change the se rver UUID of the
instance to add, all members must have a unique server UUID.
To resolve this error, I edited the auto.conf and restarted the second instance (did not touch the primary instance at all) Now if I try to check the cluster status (or any commands like
cluster.addInstance()) I get the same error as given in the title.
The auto.cnf file is automatically generated, you cannot modify this file.
In order to change the UUID, you must delete auto.cnf and restart the MySQL Server. MySQL will generate a new UUID and store it in a new auto.cnf file.
Please check the following documentation section: https://dev.mysql.com/doc/refman/8.0/en/replication-options.html#sysvar_server_uuid