SyntaxStudy
Sign Up
MySQL InnoDB Cluster and MySQL Shell
MySQL Advanced 5 min read

InnoDB Cluster and MySQL Shell

InnoDB Cluster

InnoDB Cluster combines Group Replication, MySQL Router, and MySQL Shell for a fully managed HA solution with automatic failover.

Example
# MySQL Shell
mysqlsh --uri root@primary:3306
# Create cluster
dba.createCluster("myCluster")
# Add instances
cluster = dba.getCluster()
cluster.addInstance("root@replica1:3306")
cluster.addInstance("root@replica2:3306")
# Check status
cluster.status()
# Simulate failover
cluster.setPrimaryInstance("replica1:3306")
Pro Tip

MySQL Router sits between app and cluster — transparent failover with no app code changes.