It is recommended that you always use the most recent version of MySQL Shell available. The latest version of MySQL Shell can be used with any GA version of MySQL 5.7 or 8.0.
You deploy InnoDB ReplicaSet in a similar way to InnoDB Cluster.
-
Configure at least two MySQL server instances, see Section 6.1, “Using MySQL AdminAPI”:
One functions as the primary, in the following example,
rs-1
.The other instance functions as the secondary, in this tutorial
rs-2
, which replicates the transactions applied by the primary.
This asynchronous MySQL replication, using source and replica, is similar to InnoDB Cluster. The procedure is described at Deploying a Production InnoDB Cluster.
-
Connect to the instances using MySQL Shell, and configure each instance you will use in your ReplicaSet before creating a ReplicaSet.
When creating an InnoDB ReplicaSet using MySQL Shell 8.0.28 and later, if you have security requirements that want all accounts created automatically by AdminAPI to have strict authentication requirements, you can set a value for the replicationAllowedHost configuration option of the ReplicaSet.
Once you have created the ReplicaSet, you can add instances to it. For more information, see Adding Instances to a ReplicaSet.
InnoDB ReplicaSet is compatible with sandbox instances, which you can use to deploy locally for testing purposes. See Section 6.8.1, “Deploying Sandbox Instances” for instructions. However, this tutorial assumes you are deploying a production InnoDB ReplicaSet, where each instance is running on a different host.