Search code examples
mysqlreplication

mysqlfailover automatic failover is not enabled


i use mysqlfailover

mysqlfailover [email protected]:3306 --discover-slaves-login=root [email protected]:3306 --report-values=health --verbose --failover-mode=auto --log=failoverlog.txt

it report

Attempting to contact 132.232.142.73 ... Success Attempting to contact 12.32.53.2 ... Success Replication Health Status 0 Rows Found.

it connect to 12.32.53.2 success,but Replication Health Status 0 Rows Found. when i shutdown master,it report Failed to reconnect to the master after 3 attemps. ERROR: Master has failed and automatic failover is not enabled. Check server for errors and run the mysqlrpladmin utility to perform manual failover.

what is automatic failover is not enabled? why Replication Health Status 0 Rows Found. please help me


Solution

  • You need to specify the failover mode 'auto'. Eg:

    mysqlfailover [email protected]:3306 --discover-slaves-login=root [email protected]:3306 --report-values=health --verbose --log=failoverlog.txt auto

    Hope this helps.