Setting Up MySQL InnoDB Cluster for High Availability

For applications that can’t tolerate a single point of failure, InnoDB Cluster gives you automated failover across multiple MySQL nodes using group replication — a meaningful step up from basic primary-replica setups.

# Requires MySQL Shell (mysqlsh) on each of 3+ nodes
mysqlsh

# Inside mysqlsh, configure each instance for cluster use
dba.configureInstance('root@node1:3306')
dba.configureInstance('root@node2:3306')
dba.configureInstance('root@node3:3306')

# Create the cluster from the first node
var cluster = dba.createCluster('myCluster')
cluster.addInstance('root@node2:3306')
cluster.addInstance('root@node3:3306')

cluster.status()

InnoDB Cluster automatically elects a new primary if the current one fails, and combined with MySQL Router for connection routing, applications can keep writing without manual intervention during a node failure — genuinely useful for production systems where downtime has a real cost.