Related Documentation Download this Manual
PDF (US Ltr) - 37.7Mb
PDF (A4) - 37.7Mb
PDF (RPM) - 37.0Mb
HTML Download (TGZ) - 10.2Mb
HTML Download (Zip) - 10.3Mb
HTML Download (RPM) - 8.9Mb
Man Pages (TGZ) - 214.7Kb
Man Pages (Zip) - 327.7Kb
Info (Gzip) - 3.4Mb
Info (Zip) - 3.4Mb
Excerpts from this Manual

MySQL 5.7 Reference Manual  /  InnoDB Cluster  /  Creating an InnoDB Cluster From an Existing Group Replication Deployment

20.6 Creating an InnoDB Cluster From an Existing Group Replication Deployment

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 root@
  Creating a Session to 'root@'
  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 'root@'.

  Creating InnoDB cluster 'prodCluster' on 'root@'...
  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"

User Comments
Sign Up Login You must be logged in to post a comment.