Bring the cluster back after a complete outage (rebootClusterFromCompleteOutage)
MySQLInnoDB ClusterCommand
# Are all members OFFLINE? (on every node)
mysql -h db1 -u icadmin -p -e "SELECT MEMBER_HOST, MEMBER_STATE FROM performance_schema.replication_group_members"
# Dry run first: shows the most up-to-date member and the planned steps
mysqlsh icadmin@db1:3306 --js -e "dba.rebootClusterFromCompleteOutage('prodCluster', {dryRun: true})"
mysqlsh icadmin@db1:3306 --js -e "dba.rebootClusterFromCompleteOutage('prodCluster')"
mysqlsh icadmin@db1:3306 -- cluster statusWhat it does
Re-bootstraps the group after a power loss or simultaneous restart of all nodes, when no quorum exists; picks the member with the highest GTID set and rejoins the others.
When to use it
When cluster status reports 'Cluster is not reachable' and every member shows OFFLINE.
Caution
Use only when every member is OFFLINE; if one member is still ONLINE the group is alive and the others join with rejoinInstance. Start every node before running it: if an unreachable member is more up to date, its transactions are lost. force: true ignores missing members; it is a last resort. The primary: 'host:port' option forces a specific member as primary.