MySQL 5.7 Release Notes
If you have an existing deployment of Group Replication and you
want to manage it using the MySQL Shell, the option
adoptFromGR from the
dba.createCluster() function can be used.
shell> mysqlsh --uri [email protected]:3306
Creating a Session to '[email protected]:3306'
Enter password: ****
Classic Session successfully established. No default schema selected.MySQL Shell JavaScript Code:
mysql-js> var cluster = dba.createCluster('prodCluster', {adoptFromGR: true});
A new InnoDB cluster will be created on instance '[email protected]:3306'.
Creating InnoDB cluster 'prodCluster' on '[email protected]:3306'...
Adding Seed Instance...
Cluster successfully created. Use cluster.addInstance() to add MySQL instances.
At least 3 instances are needed for the cluster to be able to withstand up to
one server failure.mysql-js> cluster.describe();
{
"clusterName": "prodCluster",
"adminType": "local",
"defaultReplicaSet": {
"name": "default",
"instances": [
{
"name": "localhost:3306",
"host": "localhost:3306",
"role": "HA"
},
{
"name": "localhost:3307",
"host": "localhost:3307",
"role": "HA"
},
{
"name": "localhost:3308",
"host": "localhost:3308",
"role": "HA"
}
]
}
}