Rechercher dans le manuel MySQL
21.6.6 Using Replica Sets with MySQL Router
You can use MySQL Router 8.0.19 and later to bootstrap against a
replica set, in the same way that InnoDB cluster can be
bootstrapped. See
Section 21.4, “Using MySQL Router with InnoDB Cluster”. The only
difference in the generated MySQL Router configuration file is the
addition of the cluster_type
option. When MySQL Router is bootstrapped against a replica set, the
generated configuration file includes:
cluster_type=rs
When you use MySQL Router with a replica set, be aware that:
The read-write port of MySQL Router directs client connections to the primary instance of the replica set
The read-only port of MySQL Router direct client connections to a secondary instance of the replica set, although it could also direct them to the primary
MySQL Router obtains information about the replica set's topology from the primary instance
MySQL Router automatically recovers when the primary instance becomes unavailable and a different instance is promoted
You work with the MySQL Router instances which have been
bootstrapped against a replica set in exactly the same way as
with InnoDB cluster. See Working with a Cluster's Routers
for information on
and
ReplicaSet
.listRouters()
.
ReplicaSet
.removeRouterMetadata()
Document created the 26/06/2006, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/mysql-rf-replicasets-working-with-router.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.