MySQL Shell 8.4  /  MySQL InnoDB ReplicaSet  /  Deploying InnoDB ReplicaSet

9.1 Deploying InnoDB ReplicaSet


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 8.0, or higher.

You deploy InnoDB ReplicaSet in a similar way to InnoDB Cluster.

  1. 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. See Section 7.4, “Deploying a Production InnoDB Cluster”.

  2. Connect to the instances using MySQL Shell, and configure each instance you will use in your ReplicaSet before creating a ReplicaSet. See Section 9.2, “Configuring InnoDB ReplicaSet Instances” and Section 9.3, “Creating an InnoDB ReplicaSet”.

    • When creating an InnoDB ReplicaSet, if you have security requirements that require all accounts created automatically by AdminAPI to have strict authentication requirements, you can set a value for the replicationAllowedHost configuration option of the ReplicaSet. See InnoDB ReplicaSet replicationAllowedHost.

  3. Once you have created the ReplicaSet, you can add instances to it. For more information, see Section 9.5, “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.